rules_jvm icon indicating copy to clipboard operation
rules_jvm copied to clipboard

contrib_rules_jvm dependencies visible in build targets

Open sbridges opened this issue 8 months ago • 2 comments

I have some protocol buffer files generated with an older version of protoc. Compiling those fails if when I add contrib_rules_jvm to MODULES.bazel. I think contrib_rules_jvm is loading a different version of protocol buffers, and that version is added as a dependency when compiling the java_library.

You can reproduce with the following archive,

test-archive.zip

bazel build ... fails with

foo/FooOuterClass.java:99: error: cannot find symbol
        makeExtensionsImmutable();

If I comment out bazel_dep(name = "contrib_rules_jvm", version = "0.28.0") in MODULE.bazel, then bazel build ... succeeds.

sbridges avatar Apr 25 '25 21:04 sbridges