-
-
Notifications
You must be signed in to change notification settings - Fork 259
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
The docs
target from java_export
fails with Protobuf dependencies
#1048
Comments
java_export
's `docs" target fails with Protobuf dependenciesjava_export
's docs
target fails with Protobuf dependencies
java_export
's docs
target fails with Protobuf dependenciesdocs
target from java_export
fails with Protobuf dependencies
You need to add a dependency on the The code compiles because The javadoc fails to compile because the symbols from protobuf are needed, and they're not being found. Adding the dep on to your |
@shs96c No luck, I've tried adding this. I've update the reproduction repo as well. Stil fails. Am I adding the correct dependencies?
|
What happens when you add the |
Sadly, still fails.
|
@shs96c can we please reopen this? |
We also encountered this same issue while trying to migrate from WORKSPACE to bzlmod: google/cel-java#326. This specifically breaks in 6.0 but works with 5.3 pinned. |
Looking into this further, I think the issue is specific to 6.0 with bzlmod. This works as expected with WORKSPACE based repository. It looks like MVS is making For example, with the following bzlmod setup (only the relevant portions are shown):
Printing all loaded dependencies shows that only the protobuf is not loaded through
Removing directive |
I believe we're running into this when attempting to load |
When a
java_library
, andjava_export
target both have protobuf dependencies, only thejava_library
target successfully builds. Thejava_export
target throws the below error for every conceivable class incom.google.protobuf
I'm guessing this was earlier reported in #462
Bazel version
.bazelrc
MODULE.bazel
Last working configuration
This issue does not occur with the below configuration (same
.bazelrc
as before)Bazel version
MODULE.bazel
Minimal reproduction
A minimal reproduction can be found at https://github.com/c16a/rules_jvm_external_javadoc_protobuf. The
main
branch reproduces the issue, but theworking
branch compiles both thejava_library
andjava_export
targets as expected.The text was updated successfully, but these errors were encountered: