Skip to content
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

Ensure Maven imports are tagged with maven_coordinates #169

Open
SanjayVas opened this issue Mar 9, 2023 · 0 comments
Open

Ensure Maven imports are tagged with maven_coordinates #169

SanjayVas opened this issue Mar 9, 2023 · 0 comments
Labels
bug Something isn't working P3 We're not considering to work on this, but happy to review a PR. (No assignee)

Comments

@SanjayVas
Copy link

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.

@comius 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working P3 We're not considering to work on this, but happy to review a PR. (No assignee)
Projects
None yet
Development

No branches or pull requests

2 participants