Skip to content

Conversation

@olafurpg
Copy link
Contributor

@olafurpg olafurpg commented Aug 25, 2021

Previously, lsif-java index failed to work in projects using the Gradle plugin https://github.com/kelloggm/checkerframework-gradle-plugin combined with Java toolchains. This PR fixes the bug by disabling the checkerframework plugin by default when running lsif-java index

@olafurpg olafurpg requested a review from Strum355 August 25, 2021 17:16
@olafurpg olafurpg self-assigned this Aug 25, 2021
@olafurpg olafurpg changed the title Mention processorpath in Gradle example for manual configuration Disable checkerframework Gradle plugin for lsif-java index Aug 25, 2021
Comment on lines +84 to +87
// Disable the checkerframework plugin because it updates the processorpath
// in a way that causes the error "plug-in not found: semanticdb".
// Details: https://github.com/kelloggm/checkerframework-gradle-plugin/blob/76d1926ae22144b082dfcfde1abe625750469398/src/main/groovy/org/checkerframework/gradle/plugin/CheckerFrameworkPlugin.groovy#L374-L376
"-PskipCheckerFramework",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Strange that we need this, the commit that added this logic specifically mentions not overwriting the existing annotationProcessor path 🤔 kelloggm/checkerframework-gradle-plugin@3db37da

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's stranger is that I validated that SemanticdbAgent is updating the processorpath correctly. It looks like a Gradle initialization order issue to me that's difficult to fix. It's easy to disable the checker framework so I went with this approach instead

@olafurpg olafurpg merged commit 8a5a263 into sourcegraph:main Aug 26, 2021
@olafurpg olafurpg deleted the xrepo-docs branch August 26, 2021 08:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants