You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 23, 2026. It is now read-only.
Repository navigation
This repository was archived by the owner on Apr 23, 2026. It is now read-only.
Support Not Generating Transitive Proto Dependencies #62
Alternative proto rulesets (namely stackb) support not generating Java byte code for proto_library.deps() via a transitive attribute.
Today, java_proto_library generates bytecode for both a proto_library's srcs and deps attributes. Generating bytecode for deps can lead to duplicate class exceptions if the consumer also tries to generate and pack the resulting class files into a JAR.
Would you consider supporting a transitive attribute for java_proto_library?
AFAICT, this should be possible today if you define your own proto_lang_toolchain and adding the .proto files that are packed into the .jar to blacklisted_protos.
Generating code for transitive (non-blacklisted) protos is by design so you don't have to explicitly mirror the proto-graph for every language, so I think it's unlikely that a transitive attribute will be supported.
Activity
Yannic commentedon Jun 18, 2020
AFAICT, this should be possible today if you define your own
proto_lang_toolchainand adding the.protofiles that are packed into the.jartoblacklisted_protos.Generating code for transitive (non-blacklisted) protos is by design so you don't have to explicitly mirror the proto-graph for every language, so I think it's unlikely that a transitive attribute will be supported.