-
Notifications
You must be signed in to change notification settings - Fork 380
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
Use patch
from @bazel_tools//tools/build_defs/repo:utils.bzl
#1269
Merged
linzhp
merged 1 commit into
bazel-contrib:master
from
bozaro:use-patch-from-bazel_tools
Jun 12, 2022
Merged
Use patch
from @bazel_tools//tools/build_defs/repo:utils.bzl
#1269
linzhp
merged 1 commit into
bazel-contrib:master
from
bozaro:use-patch-from-bazel_tools
Jun 12, 2022
Conversation
This file contains 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
bozaro
force-pushed
the
use-patch-from-bazel_tools
branch
3 times, most recently
from
June 9, 2022 10:32
1a91a25
to
e2e3c4f
Compare
bozaro
force-pushed
the
use-patch-from-bazel_tools
branch
from
June 9, 2022 10:33
e2e3c4f
to
100ed4d
Compare
linzhp
approved these changes
Jun 12, 2022
@bozaro @linzhp this actually introduce a regression for me https://github.com/sluongng/nogo-analyzer/blob/af4ff49500d5229cbd08329b7e4c47ec2e6a5185/private/deps.bzl#L298-L308 After this PR i got this
|
sluongng
added a commit
to sluongng/nogo-analyzer
that referenced
this pull request
Jun 13, 2022
It seems like bazel-contrib/bazel-gazelle#1269 broke our go_repository patches so let's revert that for now.
sluongng
added a commit
to sluongng/nogo-analyzer
that referenced
this pull request
Jun 13, 2022
It seems like bazel-contrib/bazel-gazelle#1269 broke our go_repository patches so let's revert that for now.
sluongng
added a commit
to sluongng/nogo-analyzer
that referenced
this pull request
Jun 13, 2022
It seems like bazel-contrib/bazel-gazelle#1269 broke our go_repository patches so let's revert that for now.
@sluongng Can you create a PR to revert or fix? |
sluongng
added a commit
to sluongng/bazel-gazelle
that referenced
this pull request
Jun 13, 2022
…zl` (bazel-contrib#1269)" This reverts commit 1dc3aaa. It seems like by using the native repository_ctx.path(file, strip) in bazel_tools, we would be applying the patches to the repository archive _before_ BUILD files generation. This is not desirable as patches on top of go_repository is often used to modify the BUILD files themselves. Another differences is that `patch` allow patch files without trailing blank/empty lines while repository_ctx.patch() would fail to recognize EOF in patch files without a trailing empty line: Expecting more chunk line at line xx Let's revert this change until we find a more appropriate solution to simplify go_repository structure.
#1277 FYI |
linzhp
pushed a commit
that referenced
this pull request
Jun 13, 2022
* Revert "Use `patch` from `@bazel_tools//tools/build_defs/repo:utils.bzl` (#1269)" This reverts commit 1dc3aaa. It seems like by using the native repository_ctx.path(file, strip) in bazel_tools, we would be applying the patches to the repository archive _before_ BUILD files generation. This is not desirable as patches on top of go_repository is often used to modify the BUILD files themselves. Another differences is that `patch` allow patch files without trailing blank/empty lines while repository_ctx.patch() would fail to recognize EOF in patch files without a trailing empty line: Expecting more chunk line at line xx Let's revert this change until we find a more appropriate solution to simplify go_repository structure. * go_repository: add doc regarding patch usages Highlight the reason why we had to revert a recent PR. Also applied minor formatting changes.
gcf-merge-on-green bot
referenced
this pull request
in googleapis/gapic-config-validator
Jun 27, 2022
[![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [bazel_gazelle](https://togithub.com/bazelbuild/bazel-gazelle) | http_archive | minor | `v0.25.0` -> `v0.26.0` | --- ### Release Notes <details> <summary>bazelbuild/bazel-gazelle</summary> ### [`v0.26.0`](https://togithub.com/bazelbuild/bazel-gazelle/releases/tag/v0.26.0) [Compare Source](https://togithub.com/bazelbuild/bazel-gazelle/compare/v0.25.0...v0.26.0) #### What's Changed - fix(tests): fix gazelle_generation_test expected stderr update by [@​jbedard](https://togithub.com/jbedard) in [https://github.com/bazelbuild/bazel-gazelle/pull/1220](https://togithub.com/bazelbuild/bazel-gazelle/pull/1220) - Add an e2e test confirming no output on success by [@​achew22](https://togithub.com/achew22) in [https://github.com/bazelbuild/bazel-gazelle/pull/1216](https://togithub.com/bazelbuild/bazel-gazelle/pull/1216) - Update extend.md with a practical languages example by [@​Anthony-Bible](https://togithub.com/Anthony-Bible) in [https://github.com/bazelbuild/bazel-gazelle/pull/1222](https://togithub.com/bazelbuild/bazel-gazelle/pull/1222) - fix: Remove gazelle_binary import collision by [@​illicitonion](https://togithub.com/illicitonion) in [https://github.com/bazelbuild/bazel-gazelle/pull/1226](https://togithub.com/bazelbuild/bazel-gazelle/pull/1226) - Broaden label name regex by [@​illicitonion](https://togithub.com/illicitonion) in [https://github.com/bazelbuild/bazel-gazelle/pull/1229](https://togithub.com/bazelbuild/bazel-gazelle/pull/1229) - gazelle_generation_test: redact workspace path from output by [@​dr-dime](https://togithub.com/dr-dime) in [https://github.com/bazelbuild/bazel-gazelle/pull/1231](https://togithub.com/bazelbuild/bazel-gazelle/pull/1231) - Add -print0 to print names of rewritten files by [@​dr-dime](https://togithub.com/dr-dime) in [https://github.com/bazelbuild/bazel-gazelle/pull/1213](https://togithub.com/bazelbuild/bazel-gazelle/pull/1213) - Code Quality Improvements by [@​sluongng](https://togithub.com/sluongng) in [https://github.com/bazelbuild/bazel-gazelle/pull/1197](https://togithub.com/bazelbuild/bazel-gazelle/pull/1197) - Add -strict to exit on build file and directive errors by [@​dr-dime](https://togithub.com/dr-dime) in [https://github.com/bazelbuild/bazel-gazelle/pull/1214](https://togithub.com/bazelbuild/bazel-gazelle/pull/1214) - fix(lang/proto): include imports from different targets by [@​nickgooding](https://togithub.com/nickgooding) in [https://github.com/bazelbuild/bazel-gazelle/pull/1237](https://togithub.com/bazelbuild/bazel-gazelle/pull/1237) - Update rules example in README to v0.25.0 by [@​yujunz](https://togithub.com/yujunz) in [https://github.com/bazelbuild/bazel-gazelle/pull/1240](https://togithub.com/bazelbuild/bazel-gazelle/pull/1240) - Allow static dependency resolution for Gazelle rule by [@​uhthomas](https://togithub.com/uhthomas) in [https://github.com/bazelbuild/bazel-gazelle/pull/1242](https://togithub.com/bazelbuild/bazel-gazelle/pull/1242) - Handle wrapped errors by [@​illicitonion](https://togithub.com/illicitonion) in [https://github.com/bazelbuild/bazel-gazelle/pull/1234](https://togithub.com/bazelbuild/bazel-gazelle/pull/1234) - Go: Update tests to use cmp.Diff instead of reflect.DeepEqual by [@​thempatel](https://togithub.com/thempatel) in [https://github.com/bazelbuild/bazel-gazelle/pull/1244](https://togithub.com/bazelbuild/bazel-gazelle/pull/1244) - Fix startup script manifest resolution with --nolegacy_external_runfiles by [@​jvolkman](https://togithub.com/jvolkman) in [https://github.com/bazelbuild/bazel-gazelle/pull/1247](https://togithub.com/bazelbuild/bazel-gazelle/pull/1247) - Label's package may contain [@​s](https://togithub.com/s) by [@​illicitonion](https://togithub.com/illicitonion) in [https://github.com/bazelbuild/bazel-gazelle/pull/1249](https://togithub.com/bazelbuild/bazel-gazelle/pull/1249) - Trim runfiles prefix consistently by [@​uhthomas](https://togithub.com/uhthomas) in [https://github.com/bazelbuild/bazel-gazelle/pull/1257](https://togithub.com/bazelbuild/bazel-gazelle/pull/1257) - Respect .bazelignore by [@​Whoaa512](https://togithub.com/Whoaa512) in [https://github.com/bazelbuild/bazel-gazelle/pull/1245](https://togithub.com/bazelbuild/bazel-gazelle/pull/1245) - Implement very minimalistic support for go workspaces by [@​HakanSunay](https://togithub.com/HakanSunay) in [https://github.com/bazelbuild/bazel-gazelle/pull/1250](https://togithub.com/bazelbuild/bazel-gazelle/pull/1250) - Fix typo in comment by [@​yujunz](https://togithub.com/yujunz) in [https://github.com/bazelbuild/bazel-gazelle/pull/1270](https://togithub.com/bazelbuild/bazel-gazelle/pull/1270) - Use `patch` from `@bazel_tools//tools/build_defs/repo:utils.bzl` by [@​bozaro](https://togithub.com/bozaro) in [https://github.com/bazelbuild/bazel-gazelle/pull/1269](https://togithub.com/bazelbuild/bazel-gazelle/pull/1269) - Update rules_go to 0.33.0 by [@​fmeum](https://togithub.com/fmeum) in [https://github.com/bazelbuild/bazel-gazelle/pull/1263](https://togithub.com/bazelbuild/bazel-gazelle/pull/1263) - Add support for auth_patterns in go_repository by [@​dmivankov](https://togithub.com/dmivankov) in [https://github.com/bazelbuild/bazel-gazelle/pull/1254](https://togithub.com/bazelbuild/bazel-gazelle/pull/1254) - Sluongng/revert patch by [@​sluongng](https://togithub.com/sluongng) in [https://github.com/bazelbuild/bazel-gazelle/pull/1277](https://togithub.com/bazelbuild/bazel-gazelle/pull/1277) - Stop inferring import path for empty packages by [@​linzhp](https://togithub.com/linzhp) in [https://github.com/bazelbuild/bazel-gazelle/pull/1280](https://togithub.com/bazelbuild/bazel-gazelle/pull/1280) - Don't exclude spaces from the label name regex by [@​illicitonion](https://togithub.com/illicitonion) in [https://github.com/bazelbuild/bazel-gazelle/pull/1271](https://togithub.com/bazelbuild/bazel-gazelle/pull/1271) #### New Contributors - [@​Anthony-Bible](https://togithub.com/Anthony-Bible) made their first contribution in [https://github.com/bazelbuild/bazel-gazelle/pull/1222](https://togithub.com/bazelbuild/bazel-gazelle/pull/1222) - [@​dr-dime](https://togithub.com/dr-dime) made their first contribution in [https://github.com/bazelbuild/bazel-gazelle/pull/1231](https://togithub.com/bazelbuild/bazel-gazelle/pull/1231) - [@​sluongng](https://togithub.com/sluongng) made their first contribution in [https://github.com/bazelbuild/bazel-gazelle/pull/1197](https://togithub.com/bazelbuild/bazel-gazelle/pull/1197) - [@​nickgooding](https://togithub.com/nickgooding) made their first contribution in [https://github.com/bazelbuild/bazel-gazelle/pull/1237](https://togithub.com/bazelbuild/bazel-gazelle/pull/1237) - [@​yujunz](https://togithub.com/yujunz) made their first contribution in [https://github.com/bazelbuild/bazel-gazelle/pull/1240](https://togithub.com/bazelbuild/bazel-gazelle/pull/1240) - [@​uhthomas](https://togithub.com/uhthomas) made their first contribution in [https://github.com/bazelbuild/bazel-gazelle/pull/1242](https://togithub.com/bazelbuild/bazel-gazelle/pull/1242) - [@​thempatel](https://togithub.com/thempatel) made their first contribution in [https://github.com/bazelbuild/bazel-gazelle/pull/1244](https://togithub.com/bazelbuild/bazel-gazelle/pull/1244) - [@​Whoaa512](https://togithub.com/Whoaa512) made their first contribution in [https://github.com/bazelbuild/bazel-gazelle/pull/1245](https://togithub.com/bazelbuild/bazel-gazelle/pull/1245) - [@​HakanSunay](https://togithub.com/HakanSunay) made their first contribution in [https://github.com/bazelbuild/bazel-gazelle/pull/1250](https://togithub.com/bazelbuild/bazel-gazelle/pull/1250) - [@​bozaro](https://togithub.com/bozaro) made their first contribution in [https://github.com/bazelbuild/bazel-gazelle/pull/1269](https://togithub.com/bazelbuild/bazel-gazelle/pull/1269) - [@​fmeum](https://togithub.com/fmeum) made their first contribution in [https://github.com/bazelbuild/bazel-gazelle/pull/1263](https://togithub.com/bazelbuild/bazel-gazelle/pull/1263) - [@​dmivankov](https://togithub.com/dmivankov) made their first contribution in [https://github.com/bazelbuild/bazel-gazelle/pull/1254](https://togithub.com/bazelbuild/bazel-gazelle/pull/1254) **Full Changelog**: bazel-contrib/bazel-gazelle@v0.25.0...v0.26.0 #### `WORKSPACE` code load("@​bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") http_archive( name = "bazel_gazelle", sha256 = "501deb3d5695ab658e82f6f6f549ba681ea3ca2a5fb7911154b5aa45596183fa", urls = [ "https://mirror.bazel.build/github.com/bazelbuild/bazel-gazelle/releases/download/v0.26.0/bazel-gazelle-v0.26.0.tar.gz", "https://github.com/bazelbuild/bazel-gazelle/releases/download/v0.26.0/bazel-gazelle-v0.26.0.tar.gz", ], ) load("@​bazel_gazelle//:deps.bzl", "gazelle_dependencies", "go_repository") ############################################################ ### Define your own dependencies here using go_repository. ### Else, dependencies declared by rules_go/gazelle will be used. ### The first declaration of an external repository "wins". ############################################################ gazelle_dependencies() </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/gapic-config-validator).
tyler-french
added a commit
to tyler-french/bazel-gazelle
that referenced
this pull request
Nov 28, 2022
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.
What type of PR is this?
Bug fix
What package or component does this PR mostly affect?
go_repository
What does this PR do? Why is it needed?
This PR use same apply patch logic as
http_archive
.Which issues(s) does this PR fix?
Fixes #1268
Other notes for review