-
Notifications
You must be signed in to change notification settings - Fork 4.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add strip_prefix
arg to bzlmod's git_override
#22077
Add strip_prefix
arg to bzlmod's git_override
#22077
Conversation
strip_prefix
arg to bzlmod's git_override
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
src/main/java/com/google/devtools/build/lib/bazel/bzlmod/ModuleFileGlobals.java
Show resolved
Hide resolved
"A directory prefix to strip from the extracted files. This can be used to target" | ||
+ " a subdirectory of the git repo.", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need to mention that the subdir must have it's own MODULE.bazel
with module(name = "same_as_what_you_are_overriding")
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, that would be better!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated 👍
strip_prefix
arg to bzlmod's git_override
strip_prefix
arg to bzlmod's git_override
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
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
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 <[email protected]>
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
Add
strip_prefix
arg go bzlmod'sgit_override
and 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_repository
now accepts thestrip_prefix
arg and passes it to the underlyinggit_repository
call.