Skip to content

fix(java): stop silently disabling every compile task - #598

Merged
pratyush618 merged 2 commits into
ByteVeda:masterfrom
stromanni:fix/java-errorprone-disables-compile-tasks
Aug 1, 2026
Merged

fix(java): stop silently disabling every compile task#598
pratyush618 merged 2 commits into
ByteVeda:masterfrom
stromanni:fix/java-errorprone-disables-compile-tasks

Conversation

@stromanni

@stromanni stromanni commented Aug 1, 2026

Copy link
Copy Markdown
Contributor

ErrorProneOptions exposes enabled, not isEnabled — the latter was the
name under gradle-errorprone-plugin 3.x. Since the type has no isEnabled
member today, Kotlin resolved the assignment against the outer receiver, the
JavaCompile task:

tasks.withType<JavaCompile>().configureEach {
    options.errorprone {
        isEnabled = false   // sets task.enabled = false
    }
}

So every JavaCompile in the module was disabled. compileJava escaped only
because the block below it set isEnabled = true, re-enabling that one task.
Everything else has been silently skipped:

> Task :compileTestJava SKIPPED
Skipping task ':compileTestJava' as task onlyIf 'Task is enabled' is false.

Two consequences, both shipping today:

  • The Java test suite has never run. :test reports NO-SOURCE because no
    test classes are produced. Same for :spring:compileTestJava.
  • The FFM (Panama) transport has never been compiled or packaged.
    compileJava22Java was disabled too, so the multi-release jar shipped with no
    META-INF/versions/22 overlay and JDK 22+ consumers silently stayed on JNI —
    the opposite of what NativeTransport.create documents.

Error Prone itself was unaffected: compileJava still ran NullAway, because
isEnabled never reached Error Prone in either direction.

Changes

enabled.set(...) in all three build scripts, with a comment naming the trap.

Enabling the tests surfaces one pre-existing failure, fixed in its own commit:
InMemorySettings.reservedPrefixes() never gained middleware:disabled: when
#596 added it to the core list, which is exactly the drift
ReservedSettingPrefixesTest exists to catch.

Verification

./gradlew build          # green, 487 tests, 4 consecutive runs

build/classes/java/java22/…/FfmTransport.class is produced again, and the jar
carries 6 META-INF/versions/22 entries.

Summary by CodeRabbit

  • Bug Fixes

    • Updated Java build validation settings for more reliable compilation checks.
    • Ensured disabled middleware settings are correctly recognized and preserved during testing.
  • Chores

    • Standardized static analysis configuration across Java modules.
    • Maintained existing null-safety checks and compile-time validation behavior.

ErrorProneOptions has no isEnabled member, so `isEnabled = false`
resolved against the JavaCompile receiver instead. Test compilation and
the FFM overlay have never run.
@coderabbitai

coderabbitai Bot commented Aug 1, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 59cd0fb2-9dfe-48e9-b796-77332d596ead

📥 Commits

Reviewing files that changed from the base of the PR and between 90be320 and 32933bb.

📒 Files selected for processing (4)
  • sdks/java/build.gradle.kts
  • sdks/java/processor/build.gradle.kts
  • sdks/java/spring/build.gradle.kts
  • sdks/java/src/test/java/org/byteveda/taskito/dashboard/InMemorySettings.java
🔗 Linked repositories identified

CodeRabbit considers these linked repositories for cross-repo context during reviews:

  • ByteVeda/taskito (manual)

📝 Walkthrough

Walkthrough

Changes

Error Prone configuration

Layer / File(s) Summary
Update Error Prone property configuration
sdks/java/build.gradle.kts, sdks/java/processor/build.gradle.kts, sdks/java/spring/build.gradle.kts
The build scripts replace isEnabled assignments with enabled.set(...). General compilation disables Error Prone, while configured compileJava tasks enable it. Comments document the property requirement.

Reserved settings prefix

Layer / File(s) Summary
Reserve middleware disabled prefix
sdks/java/src/test/java/org/byteveda/taskito/dashboard/InMemorySettings.java
reservedPrefixes() now includes middleware:disabled:.

Estimated code review effort: 2 (Simple) | ~10 minutes

Suggested reviewers: pratyush618

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly describes the primary Java build fix that stopped compile tasks from being silently disabled.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@pratyush618
pratyush618 merged commit 89a1aa3 into ByteVeda:master Aug 1, 2026
20 checks passed
@pratyush618 pratyush618 mentioned this pull request Aug 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants