Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Jan 15, 2026

Error Prone 2.45.0+ requires the -XDaddTypeAnnotationsToSymbol=true compiler flag when running on JDK 21. Without it, compilation fails with:

> -XDaddTypeAnnotationsToSymbol=true is required by Error Prone on JDK 21

Changes

  • Added required compiler flag to ai.errorprone-conventions.gradle.kts for all JavaCompile tasks
  • Flag is unconditionally set since the project uses JDK 21 toolchain and targets Java 8

This unblocks the Error Prone 2.45.0 → 2.46.0 upgrade in #4556.

tasks {
  withType<JavaCompile>().configureEach {
    with(options) {
      // Error Prone 2.45.0+ requires this flag when running on JDK 21
      compilerArgs.add("-XDaddTypeAnnotationsToSymbol=true")
      
      errorprone {
        // ... existing config
      }
    }
  }
}
Original prompt

Fix the GitHub Action failures in #4556


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI changed the title [WIP] Fix GitHub Action failures in issue #4556 Add -XDaddTypeAnnotationsToSymbol=true for Error Prone 2.45.0+ JDK 21 compatibility Jan 15, 2026
Copilot AI requested a review from xiang17 January 15, 2026 05:35
@xiang17 xiang17 marked this pull request as ready for review January 15, 2026 22:40
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.

2 participants