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

Consolidate maven versions of classifiers for an artifact #1179

Merged

Conversation

cheister
Copy link
Collaborator

@cheister cheister commented Jun 20, 2024

We only allow one version for a dependency and all of its classifier in our json file. If a dependency is declared with different classifiers and different versions then we still want to resolve the same version of the dependency for all of the classifiers.

For example, if you had the dependencies

"io.netty:netty-tcnative-boringssl-static:osx-aarch_64:2.0.61.Final",
"io.netty:netty-tcnative-boringssl-static:2.0.47.Final",

we want only one version to be resolved in the json file

"artifacts": {
  "io.netty:netty-tcnative-boringssl-static": {
    "shasums": {
      "jar": "b6f974972c44cd6f9cecabc255290286faac40b6393c66c3c3c0db7f421cc28e",
      "linux-aarch_64": "3614395218ae379cec22ccaa089c4f27b9329a660e0d53c93e7cb12b7a2cee46",
      "linux-x86_64": "4ff9d14f1ec6ccee35b78f53a6f3d9c7c54535aa2a76138311c2f619c5e150e1",
      "osx-aarch_64": "58e0302c9fde3db984c3ff7ee7ec7159dc0320bdb91533cc290e12e40911cd1a",
      "osx-x86_64": "fcfea887f4f0802d363c699b444d504b7109a7cb198ae6845eeff63745e5b0ba",
      "windows-x86_64": "17cd2fa3c63b7ed23edea01c945e55cb7baed1faa0f553732c3f5f56da90b3e0"
    },
    "version": "2.0.61.Final"
  },

In this case, we'll use the first version of the dependency we get in the dependency list

@cheister cheister requested review from jin, Wyverald and shs96c as code owners June 20, 2024 22:51
Copy link
Collaborator

@shs96c shs96c left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ship it!

@cheister cheister merged commit eb1adad into bazel-contrib:master Jul 1, 2024
8 checks passed
@cheister cheister deleted the consolidate-versions-of-classifiers branch July 1, 2024 17:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants