Add strip_prefix arg to bzlmod's git_override#22077
Closed
dougthor42 wants to merge 4 commits intobazelbuild:masterfrom
Closed
Add strip_prefix arg to bzlmod's git_override#22077dougthor42 wants to merge 4 commits intobazelbuild:masterfrom
strip_prefix arg to bzlmod's git_override#22077dougthor42 wants to merge 4 commits intobazelbuild:masterfrom
Conversation
strip_prefix arg to bzlmod's git_override
Member
You can just include a line in the PR message that begins with
You can add to/fix this one: https://cs.opensource.google/bazel/bazel/+/master:src/test/py/bazel/bzlmod/bazel_overrides_test.py;drc=3f9d80c35d88a280c2d53682f3d201b4733a3fff;l=234 To test locally, run |
dc02dcc to
6f560c9
Compare
dougthor42
commented
Apr 23, 2024
src/main/java/com/google/devtools/build/lib/bazel/bzlmod/ModuleFileGlobals.java
Show resolved
Hide resolved
Comment on lines
+1025
to
+1026
| "A directory prefix to strip from the extracted files. This can be used to target" | ||
| + " a subdirectory of the git repo.", |
Contributor
Author
There was a problem hiding this comment.
Do we need to mention that the subdir must have it's own MODULE.bazel with module(name = "same_as_what_you_are_overriding")?
Member
There was a problem hiding this comment.
Yes, that would be better!
strip_prefix arg to bzlmod's git_overridestrip_prefix arg to bzlmod's git_override
meteorcloudy
approved these changes
Apr 24, 2024
iancha1992
pushed a commit
to iancha1992/bazel
that referenced
this pull request
Apr 25, 2024
Add `strip_prefix` arg go bzlmod's `git_override` and pass it down to `git_repository`. This allows users to work with git repositories that have other Bazel modules in subdirectories. A prime example of such is the `rules_python`](https://github.com/bazelbuild/rules_python) repo: ``` ./rules_python ├── MODULE.bazel # available on BCR as "rules_python" └── gazelle └── MODULE.bazel # available on BCR as "rules_python_gazelle_plugin" ``` Fixes bazelbuild#22076. RELNOTES: bzlmod `git_repository` now accepts the `strip_prefix` arg and passes it to the underlying `git_repository` call. Closes bazelbuild#22077. PiperOrigin-RevId: 628059135 Change-Id: I8b9df3a5d41924302475fd9495aff6cd21ce6db2
bazel-io
pushed a commit
to bazel-io/bazel
that referenced
this pull request
Apr 25, 2024
Add `strip_prefix` arg go bzlmod's `git_override` and pass it down to `git_repository`. This allows users to work with git repositories that have other Bazel modules in subdirectories. A prime example of such is the `rules_python`](https://github.com/bazelbuild/rules_python) repo: ``` ./rules_python ├── MODULE.bazel # available on BCR as "rules_python" └── gazelle └── MODULE.bazel # available on BCR as "rules_python_gazelle_plugin" ``` Fixes bazelbuild#22076. RELNOTES: bzlmod `git_repository` now accepts the `strip_prefix` arg and passes it to the underlying `git_repository` call. Closes bazelbuild#22077. PiperOrigin-RevId: 628059135 Change-Id: I8b9df3a5d41924302475fd9495aff6cd21ce6db2
github-merge-queue bot
pushed a commit
that referenced
this pull request
Apr 26, 2024
Add `strip_prefix` arg go bzlmod's `git_override` and pass it down to `git_repository`. This allows users to work with git repositories that have other Bazel modules in subdirectories. A prime example of such is the `rules_python`](https://github.com/bazelbuild/rules_python) repo: ``` ./rules_python ├── MODULE.bazel # available on BCR as "rules_python" └── gazelle └── MODULE.bazel # available on BCR as "rules_python_gazelle_plugin" ``` Fixes #22076. RELNOTES: bzlmod `git_repository` now accepts the `strip_prefix` arg and passes it to the underlying `git_repository` call. Closes #22077. PiperOrigin-RevId: 628059135 Change-Id: I8b9df3a5d41924302475fd9495aff6cd21ce6db2 Commit 8edddb3 Co-authored-by: Douglas Thor <doug.thor@gmail.com>
Kila2
pushed a commit
to Kila2/bazel
that referenced
this pull request
May 13, 2024
Add `strip_prefix` arg go bzlmod's `git_override` and pass it down to `git_repository`. This allows users to work with git repositories that have other Bazel modules in subdirectories. A prime example of such is the `rules_python`](https://github.com/bazelbuild/rules_python) repo: ``` ./rules_python ├── MODULE.bazel # available on BCR as "rules_python" └── gazelle └── MODULE.bazel # available on BCR as "rules_python_gazelle_plugin" ``` Fixes bazelbuild#22076. RELNOTES: bzlmod `git_repository` now accepts the `strip_prefix` arg and passes it to the underlying `git_repository` call. Closes bazelbuild#22077. PiperOrigin-RevId: 628059135 Change-Id: I8b9df3a5d41924302475fd9495aff6cd21ce6db2
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.

Add
strip_prefixarg go bzlmod'sgit_overrideand pass it down togit_repository.This allows users to work with git repositories that have other Bazel modules in subdirectories.
A prime example of such is the
rules_python](https://github.com/bazelbuild/rules_python) repo:Fixes #22076.
RELNOTES:
bzlmod
git_repositorynow accepts thestrip_prefixarg and passes it to the underlyinggit_repositorycall.