-
Notifications
You must be signed in to change notification settings - Fork 28
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
Amend docs to support Bazel 6 #600
Comments
fwiw just commenting out the javac-import line got me most of the way there: ciarand@d48f520 With that and the javac options (ciarand@ebfa154) most of our Java libraries are building as hoped for (.semanticdb file in the jar). Unfortunately I have not been able to get our libraries that use auto value to work in conjunction with this plugin. I get an error indicating a sourceroot mismatch, which sort of makes sense:
Is this a bazel 6 thing or should I file a separate issue? |
I managed to fix this by patching the With these changes the indexing appears to work across all our Java libraries being built via Bazel 6. Is it worth me cleaning these patches up and putting together an MR? I haven't verified any of the more widespread implications of these changes |
Ah, more trouble, though these can probably be moved to a separate issue. The indexing is working, but the BazelBuildTool part ( Swapping out the logic in BazelOptions with a hacky version that just iterates over all the jars that don't have "runfiles" in the name made the scip generation succeed, but that path doesn't seem particularly elegant (and it took a few more naive filters to get it to complete within a reasonable time / not overload the |
I ended up doing the same as part of #602 - but additionally we now resolve the location where javac generates sources - which seems to match what Bazel gives it - so we can separately handle the generated sources that are not part of the source tree. At this point I lean towards ignoring them entirely, because symbols in them point to nowhere (because those sources are not present anywhere) - but this might change. |
I agree with @keynmol's point that ignoring generated files (in that, not attempting to emit SCIP Documents) is the right thing to do for now. Since there's no notion of virtual files in SCIP, there is no reasonable relative path that can be used. So it makes sense to skip emitting occurrences for them. In scip-clang (indexer for C and C++), we also have something similar: https://sourcegraph.com/github.com/sourcegraph/scip-clang/-/blob/indexer/FileMetadata.h?L19-43 Adding support for generated files would require a significant amount of work (cutting across the Sourcegraph backend and frontend and different indexers). |
waves hands Most things work, but langtools was removed:
The text was updated successfully, but these errors were encountered: