Add support for apparent names to --override_repository#27706
Add support for apparent names to --override_repository#27706fmeum wants to merge 11 commits intobazelbuild:masterfrom
--override_repository#27706Conversation
|
@bazel-io fork 9.0.0 |
|
@bazel-io fork 8.5.0 |
|
I assume this override happens after bazel module resolution? Will it also influence module extension resolution? It's better to explicitly document the behaviour. |
This override happens before module resolution (which is why it needs tricks to implement). I actually don't think we have any overrides that apply after module resolution other than |
|
Hmm, I remember If this happens before module resolution, then for bazel modules, users should just use |
You are indeed right and this PR doesn't change that behavior. :-) I have added additional explanations to the flag docs. |
|
Looks like this caught some bugs in our tests, will fix them later. |
f20d9e2 to
a04a1cf
Compare
|
CI is green. This found a few tests that didn't test what they thought they did |
Wyverald
left a comment
There was a problem hiding this comment.
nice! thank you for addressing this long-standing feature request :) (I added the relevant links to the PR description)
src/main/java/com/google/devtools/build/lib/cmdline/RepositoryName.java
Outdated
Show resolved
Hide resolved
src/main/java/com/google/devtools/build/lib/bazel/repository/RepoDefinitionFunction.java
Outdated
Show resolved
Hide resolved
src/main/java/com/google/devtools/build/lib/bazel/repository/RepoDefinitionFunction.java
Outdated
Show resolved
Hide resolved
src/main/java/com/google/devtools/build/lib/bazel/repository/RepoDefinitionFunction.java
Outdated
Show resolved
Hide resolved
e88c308 to
43bdb11
Compare
|
@fmeum Could you please take a look at the failing checks? |
|
@bharadwaj08-one Should be fixed now |
|
@Wyverald Is this awaiting merge now? |
|
@Wyverald is OOO, but this is good to go. |
|
@fmeum Could you please resolve the conflicts? |
The implementation has to handle command line overrides on module repos subject to non-registry overrides specially to avoid a cycle when requesting the main repo mapping. RELNOTES: `--override_repository` now supports apparent repository names from the point of view of the main repository. An unknown apparent repo name will result in an error.
dae58b7 to
e83cac5
Compare
|
@bharadwaj08-one Done |
The implementation has to handle command line overrides on module repos subject to non-registry overrides specially to avoid a cycle when requesting the main repo mapping. Fixes bazelbuild#24617 Fixes bazelbuild#17128 RELNOTES: `--override_repository` now supports apparent repository names from the point of view of the main repository. An unknown apparent repo name will result in an error. Closes bazelbuild#27706. PiperOrigin-RevId: 841652194 Change-Id: Ic8d53e5c7beec0cf14a293c2d589ab08a5ba4f9d
…7898) The implementation has to handle command line overrides on module repos subject to non-registry overrides specially to avoid a cycle when requesting the main repo mapping. Fixes #24617 Fixes #17128 RELNOTES: `--override_repository` now supports apparent repository names from the point of view of the main repository. An unknown apparent repo name will result in an error. Closes #27706. PiperOrigin-RevId: 841652194 Change-Id: Ic8d53e5c7beec0cf14a293c2d589ab08a5ba4f9d Commit 82c06ca Co-authored-by: Fabian Meumertzheim <[email protected]>
The implementation has to handle command line overrides on module repos subject to non-registry overrides specially to avoid a cycle when requesting the main repo mapping.
Fixes #24617
Fixes #17128
RELNOTES:
--override_repositorynow supports apparent repository names from the point of view of the main repository. An unknown apparent repo name will result in an error.