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
Using multiple maven_install declarations for isolated artifact version trees is awesome; it makes some hard things a lot easier. But there's a catch: the setup is not protected from mixing artifacts across different artifact trees. Users need to be diligent in ensuring that only one deps tree is in the transitive dependencies of a java_binary, or it is possible that incompatibly-versioned libraries may get used together.
One way this problem could be avoided is if the jvm_import targets declared by rules_jvm_external could have platform constraints attached. I think it would be sufficient to have one constraint spec for an entire maven_install repo; I don't think it'd need to be more granular. Going back to the README's example, that might look something like:
And then callers could be certain that they only used dependencies from @android_app when building for Android and only used dependencies from @server_app when building for the server.
The text was updated successfully, but these errors were encountered:
Using multiple maven_install declarations for isolated artifact version trees is awesome; it makes some hard things a lot easier. But there's a catch: the setup is not protected from mixing artifacts across different artifact trees. Users need to be diligent in ensuring that only one deps tree is in the transitive dependencies of a
java_binary
, or it is possible that incompatibly-versioned libraries may get used together.One way this problem could be avoided is if the
jvm_import
targets declared byrules_jvm_external
could have platform constraints attached. I think it would be sufficient to have one constraint spec for an entiremaven_install
repo; I don't think it'd need to be more granular. Going back to the README's example, that might look something like:And then callers could be certain that they only used dependencies from
@android_app
when building for Android and only used dependencies from@server_app
when building for the server.The text was updated successfully, but these errors were encountered: