fix(bzlmod): allow users to specify extra targets to be added to hub repos #2369
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Before this change, it was impossible for users to use the targets
created with
additive_build_content
whl annotation unless they reliedon the implementation detail of the naming of the spoke repositories and
had
use_repo
statements in theirMODULE.bazel
files importing thespoke repos.
With #2325 in the works, users will have to change their
use_repo
statements, which is going to be disruptive. In order to offer them an
alternative for not relying on the names of the spokes, there has to be
a way to expose the extra targets created and this PR implements a
method. Incidentally, the same would have happened if we wanted to
stabilize the #260 work and mark
experimental_index_url
asnon-experimental anymore.
I was hoping we could autodetect them by parsing the build content
ourselves in the
pip
extension, but it turned out to be extremelytricky and I figured that it was better to have an API rather than not
have it.
Whilst at it, also relax the naming requirements for the
whl_modifications
attribute.Fixes #2187