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
rules_proto imports the protobuf-java library from Maven using the java_import_external macro. Unlike the sibling jvm_maven_import_external macro, this macro does not set the maven_coordinate tag which is read by rules_jvm_external in order to ensure that exported artifacts have the appropriate artifact dependencies. Not having this results in exported Maven artifacts including protobuf-java directly rather than as an artifact dependency. This can result in downstream users having duplicate copies of protobuf-java, possibly with different versions.
rules_proto should either switch to jvm_maven_import_external or specify the maven_coordinate manually.
Related interaction with rules_jvm_external
If a project depends on rules_proto for java_proto_library and also uses rules_jvm_external for other Maven dependencies, it could result in a library depending on multiple versions of protobuf-java. To avoid this, downstream projects can specify the protobuf-java targets from @com_google_protobuf in the override_targets attribute of maven_install.
The text was updated successfully, but these errors were encountered:
comius
added
bug
Something isn't working
P3
We're not considering to work on this, but happy to review a PR. (No assignee)
labels
Aug 30, 2023
rules_proto imports the protobuf-java library from Maven using the
java_import_external
macro. Unlike the siblingjvm_maven_import_external
macro, this macro does not set themaven_coordinate
tag which is read by rules_jvm_external in order to ensure that exported artifacts have the appropriate artifact dependencies. Not having this results in exported Maven artifacts including protobuf-java directly rather than as an artifact dependency. This can result in downstream users having duplicate copies of protobuf-java, possibly with different versions.rules_proto should either switch to
jvm_maven_import_external
or specify themaven_coordinate
manually.Related interaction with rules_jvm_external
If a project depends on rules_proto for
java_proto_library
and also uses rules_jvm_external for other Maven dependencies, it could result in a library depending on multiple versions of protobuf-java. To avoid this, downstream projects can specify the protobuf-java targets from@com_google_protobuf
in theoverride_targets
attribute ofmaven_install
.The text was updated successfully, but these errors were encountered: