Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Omit unique module versions from canonical repo names
The canonical repository name of a module `rules_foo` is now `rules_foo~` instead of e.g. `rules_foo~1.2.3` if there is only a single version of the module in the entire dep graph. This also applies to overrides, which previously used the canonical repository name `rules_foo~override`. This improves cacheability of actions across module version changes and also prevents the output base from filling up with outdated module and extension repositories. See the long comment in `ModuleKey#getCanonicalRepoName` for a detailed explanation of why this particular scheme was chosen. The change includes a bump of the lockfile version as the canonical repo names of label attributes in extension usages are affected. RELNOTES: The scheme for generating canonical repository names has changed to improve cacheability of actions across dependency version updates. Note that canonical names are not considered to be public API and can change at any time. See https://bazel.build/external/module#repository_names_and_strict_deps for advice on how to avoid hardcoding canonical repository names. Fixes #20997 Closes #21035. PiperOrigin-RevId: 605730371 Change-Id: Ica1be1ba5493d3636248a79a6549a0927021bef9
- Loading branch information