fix(bzlmod): allow users to specify extra targets to be added to hub repos#2369
Merged
aignas merged 10 commits intobazel-contrib:mainfrom Nov 5, 2024
Merged
fix(bzlmod): allow users to specify extra targets to be added to hub repos#2369aignas merged 10 commits intobazel-contrib:mainfrom
aignas merged 10 commits intobazel-contrib:mainfrom
Conversation
This was referenced Nov 4, 2024
Closed
…the values of the extra aliases field to be passed to the hub repo, because I have no visibility into what annotatinos are passed to what hubs, because of how the code is structured today. Lets just ask the user to specify those explicitly
13d160b to
743aa21
Compare
rickeylev
approved these changes
Nov 5, 2024
github-merge-queue bot
pushed a commit
that referenced
this pull request
Nov 19, 2024
The extra_hub_aliases feature from #2369 has bindings in the pip extension for bzlmod users, but not pip_repository for WORKSPACE users. But it _can_ work for either, so this patch moves it to the list of attrs the two share and makes it work with the latter. --------- Co-authored-by: Ignas Anikevicius <240938+aignas@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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_contentwhl annotation unless they reliedon the implementation detail of the naming of the spoke repositories and
had
use_repostatements in theirMODULE.bazelfiles importing thespoke repos.
With #2325 in the works, users will have to change their
use_repostatements, 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_urlasnon-experimental anymore.
I was hoping we could autodetect them by parsing the build content
ourselves in the
pipextension, 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_modificationsattribute.Fixes #2187