Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Special handling of Bazel with source generators #602

Merged
merged 5 commits into from
Jul 6, 2023

Conversation

keynmol
Copy link
Contributor

@keynmol keynmol commented Jun 30, 2023

The original issue was reported by a customer on a private codebase, and amounted to the usage of source generators crashing the javac plugin because the inferred sourceroot didn't match the location where Bazel spits out files generated by annotation processors.

By sheer luck, @ciarand in #600 was working through the same issues.

This PR makes the handling of those scenarios more robust and adds a reduced form of the problematic setup to the bazel example, so that it runs on CI

  • Handle path with filename separated by :
  • Detect javac' source generation root
  • Not include semanticdb files for auto-generated files

Test plan

  • extra test for source generators in Bazel

I verified that the SCIP index produced contains both examples, and doesn't contain documents for generated code
image

- Handle path with filename separated by :
- Detect javac' source generation root
- Not include semanticdb files for auto-generated files
@keynmol keynmol marked this pull request as ready for review July 3, 2023 13:17
@keynmol keynmol requested a review from olafurpg July 3, 2023 13:17
@olafurpg olafurpg merged commit eef8f3c into main Jul 6, 2023
@olafurpg olafurpg deleted the bazel-auto-generated branch July 6, 2023 13:37
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