Skip to content
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

go_repository: add 'clean' build_file_generation #1802

Merged
merged 2 commits into from
Jun 1, 2024

Conversation

TvdW
Copy link
Contributor

@TvdW TvdW commented May 14, 2024

What type of PR is this?

Feature

What package or component does this PR mostly affect?

go_repository

What does this PR do? Why is it needed?

Before bzlmod, repositories were global, and BUILD files inside upstream repositories could load from the repositories defined at the root-level WORKSPACE file.

With the introduction of visibility rules, these result in errors that cannot trivially be worked around. One pattern that has emerged is ignoring existing build files by specifying gazelle:build_file_name BUILD.bazel, however this does not work for anything already using BUILD.bazel filenames.

This does affect real-world users: an example is https://github.com/google/go-jsonnet which has a BUILD.bazel file to genrule its AST. The module is pure-go, but the build step contains cpp code, and when imported under bzlmod-gazelle will not work because the cpp code is invoked. As a workaround, there is now a 'jsonnet' BCR module.

This patch introduces a build_file_generation = clean option, which removes existing build files before generating new ones. It allows loading the jsonnet code once again, and also makes it possible to load some of the complex protobuf repositories.

Which issues(s) does this PR fix?

Fixes #1773, #1769, #1535, bazelbuild/rules_go#3685

Other notes for review

I have not made 'clean' the default, though I think that for most use cases it will be the correct behavior.

An example for fixing jsonnet:

go_deps.gazelle_override(
    build_file_generation = "clean",
    path = "github.com/google/go-jsonnet",
)

With some gymnastics this does also make it possible to import googleapis as if it were a regular Go dependency, without any switched_rules:

go_deps.module(
    path = "github.com/googleapis/googleapis",
    sum = "unused",
    version = "0.0.0",
)
go_deps.gazelle_override(
    build_file_generation = "clean",
    directives = [
        "gazelle:proto file",
    ],
    path = "github.com/googleapis/googleapis",
)
go_deps.archive_override(
    path = "github.com/googleapis/googleapis",
    sha256 = "7faad14f34810d1165a9873c140b378bc783a1448e46ebdd20a65ca66afa7bb1",
    strip_prefix = "googleapis-7002406181eb300da880701035a25157a5099abb",
    urls = ["https://github.com/googleapis/googleapis/archive/7002406181eb300da880701035a25157a5099abb.zip"],
)

# resolution
 "gazelle:resolve proto google/rpc/code.proto @com_github_googleapis_googleapis//google/rpc:code_proto",
 "gazelle:resolve proto google/rpc/status.proto @com_github_googleapis_googleapis//google/rpc:status_proto",
 "gazelle:resolve proto google/api/annotations.proto @com_github_googleapis_googleapis//google/api:annotations_proto",
 "gazelle:resolve proto google/api/field_behavior.proto @com_github_googleapis_googleapis//google/api:field_behavior_proto",

@TvdW
Copy link
Contributor Author

TvdW commented May 14, 2024

I've marked this PR as draft as I have not yet added tests, but I am planning to.

@fmeum
Copy link
Collaborator

fmeum commented May 14, 2024

This is highly appreciated, let me know if you get stuck anywhere.

@fmeum
Copy link
Collaborator

fmeum commented May 14, 2024

Cc @linzhp for googleapis

@TvdW TvdW force-pushed the build-file-generation-clean branch from 1cf1c77 to d0d39df Compare May 15, 2024 09:05
@TvdW TvdW marked this pull request as ready for review May 15, 2024 09:06
@TvdW TvdW marked this pull request as draft May 15, 2024 09:08
@TvdW TvdW force-pushed the build-file-generation-clean branch 2 times, most recently from 6adecf6 to 6939d6a Compare May 15, 2024 09:58
@TvdW
Copy link
Contributor Author

TvdW commented May 15, 2024

Ok, I've added tests. Turns out it broke on Windows, so I fixed that and then it broke on Bazel 6.x, so I ended up adding the code into cmd/fetch_repo. My initial attempt was to add it into Gazelle itself, however between fetch_repo and Gazelle the go_repository code first writes a BUILD file with directives, and that would have been removed/ignored by my changes. Tests are green now 😄

This adds a test to see if this error is fixed:

ERROR: no such package '@@[unknown repo 'cpp_jsonnet' requested from @@gazelle~~go_deps~com_github_google_go_jsonnet]//stdlib': The repository '@@[unknown repo 'cpp_jsonnet' requested from @@gazelle~~go_deps~com_github_google_go_jsonnet]' could not be resolved: No repository visible as '@cpp_jsonnet' from repository '@@gazelle~~go_deps~com_github_google_go_jsonnet'
ERROR: /private/var/tmp/_bazel_tom.vanderwoerdt/c65fedc35a8ffb2abdd111f841d4694d/external/gazelle~~go_deps~com_github_google_go_jsonnet/astgen/BUILD.bazel:3:8: no such package '@@[unknown repo 'cpp_jsonnet' requested from @@gazelle~~go_deps~com_github_google_go_jsonnet]//stdlib': The repository '@@[unknown repo 'cpp_jsonnet' requested from @@gazelle~~go_deps~com_github_google_go_jsonnet]' could not be resolved: No repository visible as '@cpp_jsonnet' from repository '@@gazelle~~go_deps~com_github_google_go_jsonnet' and referenced by '@@gazelle~~go_deps~com_github_google_go_jsonnet//astgen:dumpstdlibast'

I'm not testing any of the googleapis things I mentioned: since googleapis is technically not a Go repository, getting it working is a happy side-effect.

@TvdW TvdW marked this pull request as ready for review May 15, 2024 10:04
@TvdW TvdW force-pushed the build-file-generation-clean branch from 6939d6a to 3329c41 Compare May 15, 2024 10:06
@TvdW
Copy link
Contributor Author

TvdW commented May 15, 2024

I've added one more commit on top, reordering (and deduplicating) some code so that fetch_repo is always called. From the commit message:

go_repository: always call fetch_repo, even for urls

After my changes to remove build files as part of fetch_repo, I realized
that when urls=[] is specified the code path doesn't use fetch_repo at
all. In this case, fetch_repo_args would remain None, and raise an
error. Not ideal!

This left me with two general options: either I move the code into a
separate command invocation, or I have all code go through fetch_repo.

The latter seems to be the pragmatic solution: gazelle by itself doesn't
generate code with urls=[] (in either bzlmod or vanilla update-repos),
so it's the option with lower performance impact (also considering we're
stacking it on top of a network download).

Copy link
Collaborator

@fmeum fmeum left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@tyler-french Could you test this?

@fmeum
Copy link
Collaborator

fmeum commented May 21, 2024

Thanks for getting rid of some unnecessary special casing, the code is easier to follow now even though it's longer.

TvdW added 2 commits June 1, 2024 09:21
Before bzlmod, repositories were global, and BUILD files inside upstream
repositories could load from the repositories defined at the root-level
WORKSPACE file.

With the introduction of visibility rules, these result in errors that
cannot trivially be worked around. One pattern that has emerged is
ignoring existing build files by specifying `gazelle:build_file_name
BUILD.bazel`, however this does not work for anything already using
BUILD.bazel filenames.

This does affect real-world users: an example is
github.com/google/go-jsonnet which has a BUILD.bazel file to `genrule`
its AST. The module is pure-go, but the build step contains cpp code,
and when imported under bzlmod-gazelle will not work because the cpp
code is invoked. As a workaround, there is now a 'jsonnet' BCR module.

This patch introduces a `build_file_generation = clean` option, which
removes existing build files before generating new ones. It allows
loading the jsonnet code once again, and also makes it possible to
load some of the complex protobuf repositories.
After my changes to remove build files as part of fetch_repo, I realized
that when urls=[] is specified the code path doesn't use fetch_repo at
all. In this case, fetch_repo_args would remain None, and raise an
error. Not ideal!

This left me with two general options: either I move the code into a
separate command invocation, or I have all code go through fetch_repo.

The latter seems to be the pragmatic solution: gazelle by itself doesn't
generate code with urls=[] (in either bzlmod or vanilla update-repos),
so it's the option with lower performance impact (also considering we're
stacking it on top of a network download).
@fmeum fmeum force-pushed the build-file-generation-clean branch from 750e401 to 1fc5587 Compare June 1, 2024 07:21
@fmeum fmeum merged commit 7d10bf7 into bazelbuild:master Jun 1, 2024
15 checks passed
renovate bot referenced this pull request in kreempuff/rules_unreal_engine Aug 1, 2024
[![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.36.0` -> `v0.38.0` |

---

> [!WARNING]
> Some dependencies could not be looked up. Check the Dependency
Dashboard for more information.

---

### Release Notes

<details>
<summary>bazelbuild/bazel-gazelle (bazel_gazelle)</summary>

###
[`v0.38.0`](https://togithub.com/bazelbuild/bazel-gazelle/releases/tag/v0.38.0)

[Compare
Source](https://togithub.com/bazelbuild/bazel-gazelle/compare/v0.37.0...v0.38.0)

#### What's Changed

- Add support for `include()` in `MODULE.bazel` by
[@&#8203;fmeum](https://togithub.com/fmeum) in
[https://github.com/bazelbuild/bazel-gazelle/pull/1810](https://togithub.com/bazelbuild/bazel-gazelle/pull/1810)
- feat: gazelle_test test rule by
[@&#8203;hunshcn](https://togithub.com/hunshcn) in
[https://github.com/bazelbuild/bazel-gazelle/pull/1785](https://togithub.com/bazelbuild/bazel-gazelle/pull/1785)
- Handle arm64 host platform for MacOS by
[@&#8203;smocherla-brex](https://togithub.com/smocherla-brex) in
[https://github.com/bazelbuild/bazel-gazelle/pull/1817](https://togithub.com/bazelbuild/bazel-gazelle/pull/1817)
- go_repository: add 'clean' build_file_generation by
[@&#8203;TvdW](https://togithub.com/TvdW) in
[https://github.com/bazelbuild/bazel-gazelle/pull/1802](https://togithub.com/bazelbuild/bazel-gazelle/pull/1802)
- fix: support leading ./ in .bazelignore by
[@&#8203;jbedard](https://togithub.com/jbedard) in
[https://github.com/bazelbuild/bazel-gazelle/pull/1828](https://togithub.com/bazelbuild/bazel-gazelle/pull/1828)
- Restore compatibility with Go 1.18 by
[@&#8203;fmeum](https://togithub.com/fmeum) in
[https://github.com/bazelbuild/bazel-gazelle/pull/1833](https://togithub.com/bazelbuild/bazel-gazelle/pull/1833)
- Remove reliance on specific canonical repo name scheme by
[@&#8203;fmeum](https://togithub.com/fmeum) in
[https://github.com/bazelbuild/bazel-gazelle/pull/1835](https://togithub.com/bazelbuild/bazel-gazelle/pull/1835)
- temporarily disable `//internal:bazel_test` on Mac to fix CI by
[@&#8203;tyler-french](https://togithub.com/tyler-french) in
[https://github.com/bazelbuild/bazel-gazelle/pull/1842](https://togithub.com/bazelbuild/bazel-gazelle/pull/1842)
- update readmes for latest release by
[@&#8203;tyler-french](https://togithub.com/tyler-french) in
[https://github.com/bazelbuild/bazel-gazelle/pull/1840](https://togithub.com/bazelbuild/bazel-gazelle/pull/1840)
- \[Gazelle] Fix Duplicate Load Bug by
[@&#8203;ckilian867](https://togithub.com/ckilian867) in
[https://github.com/bazelbuild/bazel-gazelle/pull/1841](https://togithub.com/bazelbuild/bazel-gazelle/pull/1841)
- \[Proto] Require space between 'service' and service name in regex
matching by [@&#8203;ckilian867](https://togithub.com/ckilian867) in
[https://github.com/bazelbuild/bazel-gazelle/pull/1845](https://togithub.com/bazelbuild/bazel-gazelle/pull/1845)
- \[Proto] Keep track of the names of Services, Messages, and Enums by
[@&#8203;ckilian867](https://togithub.com/ckilian867) in
[https://github.com/bazelbuild/bazel-gazelle/pull/1844](https://togithub.com/bazelbuild/bazel-gazelle/pull/1844)
- Always check files in generation tests by
[@&#8203;Whoaa512](https://togithub.com/Whoaa512) in
[https://github.com/bazelbuild/bazel-gazelle/pull/1847](https://togithub.com/bazelbuild/bazel-gazelle/pull/1847)
- Support label using regexp in directive `gazelle:resolve_regexp` by
[@&#8203;lkassar-stripe](https://togithub.com/lkassar-stripe) in
[https://github.com/bazelbuild/bazel-gazelle/pull/1822](https://togithub.com/bazelbuild/bazel-gazelle/pull/1822)
- Add `external/...` prefix to `${SRCDIR}` in external repos by
[@&#8203;fmeum](https://togithub.com/fmeum) in
[https://github.com/bazelbuild/bazel-gazelle/pull/1850](https://togithub.com/bazelbuild/bazel-gazelle/pull/1850)
- feat(tools): add a tool to automate the generation of go_deps
overrides by [@&#8203;tyler-french](https://togithub.com/tyler-french)
in
[https://github.com/bazelbuild/bazel-gazelle/pull/1677](https://togithub.com/bazelbuild/bazel-gazelle/pull/1677)
- prepare release 0.38 by
[@&#8203;tyler-french](https://togithub.com/tyler-french) in
[https://github.com/bazelbuild/bazel-gazelle/pull/1849](https://togithub.com/bazelbuild/bazel-gazelle/pull/1849)

#### New Contributors

- [@&#8203;smocherla-brex](https://togithub.com/smocherla-brex) made
their first contribution in
[https://github.com/bazelbuild/bazel-gazelle/pull/1817](https://togithub.com/bazelbuild/bazel-gazelle/pull/1817)
- [@&#8203;TvdW](https://togithub.com/TvdW) made their first
contribution in
[https://github.com/bazelbuild/bazel-gazelle/pull/1802](https://togithub.com/bazelbuild/bazel-gazelle/pull/1802)
- [@&#8203;ckilian867](https://togithub.com/ckilian867) made their first
contribution in
[https://github.com/bazelbuild/bazel-gazelle/pull/1841](https://togithub.com/bazelbuild/bazel-gazelle/pull/1841)
- [@&#8203;lkassar-stripe](https://togithub.com/lkassar-stripe) made
their first contribution in
[https://github.com/bazelbuild/bazel-gazelle/pull/1822](https://togithub.com/bazelbuild/bazel-gazelle/pull/1822)

**Full Changelog**:
bazelbuild/bazel-gazelle@v0.37.0...v0.38.0

###
[`v0.37.0`](https://togithub.com/bazelbuild/bazel-gazelle/releases/tag/v0.37.0)

[Compare
Source](https://togithub.com/bazelbuild/bazel-gazelle/compare/v0.36.0...v0.37.0)

#### What's Changed

- Apply map_kind to args as well as rule kinds by
[@&#8203;illicitonion](https://togithub.com/illicitonion) in
[https://github.com/bazelbuild/bazel-gazelle/pull/1722](https://togithub.com/bazelbuild/bazel-gazelle/pull/1722)
- Add a pointer to bzlmod guide by
[@&#8203;sluongng](https://togithub.com/sluongng) in
[https://github.com/bazelbuild/bazel-gazelle/pull/1781](https://togithub.com/bazelbuild/bazel-gazelle/pull/1781)
- \[Extraction] prep for go.mod & go.work FilePath ReplaceDirective work
by [@&#8203;stefanpenner](https://togithub.com/stefanpenner) in
[https://github.com/bazelbuild/bazel-gazelle/pull/1780](https://togithub.com/bazelbuild/bazel-gazelle/pull/1780)
- \[cmd/fetch_repo] make cache corruption failures more clear by
[@&#8203;tyler-french](https://togithub.com/tyler-french) in
[https://github.com/bazelbuild/bazel-gazelle/pull/1782](https://togithub.com/bazelbuild/bazel-gazelle/pull/1782)
- Nit: pass -modcacherw in exec.Command. by
[@&#8203;hauserx](https://togithub.com/hauserx) in
[https://github.com/bazelbuild/bazel-gazelle/pull/1784](https://togithub.com/bazelbuild/bazel-gazelle/pull/1784)
- Mention JS extension in Aspect CLI by
[@&#8203;alexeagle](https://togithub.com/alexeagle) in
[https://github.com/bazelbuild/bazel-gazelle/pull/1646](https://togithub.com/bazelbuild/bazel-gazelle/pull/1646)
- \[Feature] bzlmod & go.work by
[@&#8203;stefanpenner](https://togithub.com/stefanpenner) in
[https://github.com/bazelbuild/bazel-gazelle/pull/1731](https://togithub.com/bazelbuild/bazel-gazelle/pull/1731)
- Add GIT_CONFIG_\* env vars to go_repository allow-list by
[@&#8203;mortenmj](https://togithub.com/mortenmj) in
[https://github.com/bazelbuild/bazel-gazelle/pull/1791](https://togithub.com/bazelbuild/bazel-gazelle/pull/1791)
- Reformat with latest buildifier by
[@&#8203;fmeum](https://togithub.com/fmeum) in
[https://github.com/bazelbuild/bazel-gazelle/pull/1792](https://togithub.com/bazelbuild/bazel-gazelle/pull/1792)
- \[Feature] go.mod FilePath ReplaceDirective Support by
[@&#8203;stefanpenner](https://togithub.com/stefanpenner) in
[https://github.com/bazelbuild/bazel-gazelle/pull/1776](https://togithub.com/bazelbuild/bazel-gazelle/pull/1776)
- Fix README.rst by
[@&#8203;AugustKarlstedt](https://togithub.com/AugustKarlstedt) in
[https://github.com/bazelbuild/bazel-gazelle/pull/1795](https://togithub.com/bazelbuild/bazel-gazelle/pull/1795)
- Update README.rst by
[@&#8203;AugustKarlstedt](https://togithub.com/AugustKarlstedt) in
[https://github.com/bazelbuild/bazel-gazelle/pull/1796](https://togithub.com/bazelbuild/bazel-gazelle/pull/1796)
- Normalise newlines on Windows by
[@&#8203;illicitonion](https://togithub.com/illicitonion) in
[https://github.com/bazelbuild/bazel-gazelle/pull/1798](https://togithub.com/bazelbuild/bazel-gazelle/pull/1798)
- Fix go.work use ROOT moddir by
[@&#8203;hunshcn](https://togithub.com/hunshcn) in
[https://github.com/bazelbuild/bazel-gazelle/pull/1800](https://togithub.com/bazelbuild/bazel-gazelle/pull/1800)
- allow go_visibility directive to change command package's visibility
by [@&#8203;hunshcn](https://togithub.com/hunshcn) in
[https://github.com/bazelbuild/bazel-gazelle/pull/1794](https://togithub.com/bazelbuild/bazel-gazelle/pull/1794)
- Ensure the Gazelle binary is built for the right platform by
[@&#8203;EdSchouten](https://togithub.com/EdSchouten) in
[https://github.com/bazelbuild/bazel-gazelle/pull/1803](https://togithub.com/bazelbuild/bazel-gazelle/pull/1803)
- Add support for `debug_mode` option to `go_deps` by
[@&#8203;davidbyttow](https://togithub.com/davidbyttow) in
[https://github.com/bazelbuild/bazel-gazelle/pull/1806](https://togithub.com/bazelbuild/bazel-gazelle/pull/1806)
- Remove special resolution of go_proto imports by
[@&#8203;linzhp](https://togithub.com/linzhp) in
[https://github.com/bazelbuild/bazel-gazelle/pull/1807](https://togithub.com/bazelbuild/bazel-gazelle/pull/1807)
- address nogo complaints about variable shadowing by
[@&#8203;pmenglund](https://togithub.com/pmenglund) in
[https://github.com/bazelbuild/bazel-gazelle/pull/1808](https://togithub.com/bazelbuild/bazel-gazelle/pull/1808)
- Make `# gazelle:proto file` work without needing to set different
`option go_package` in .proto files by
[@&#8203;jeromep-stripe](https://togithub.com/jeromep-stripe) in
[https://github.com/bazelbuild/bazel-gazelle/pull/1765](https://togithub.com/bazelbuild/bazel-gazelle/pull/1765)
- go_deps: ignore go.work toolchain directive by
[@&#8203;malt3](https://togithub.com/malt3) in
[https://github.com/bazelbuild/bazel-gazelle/pull/1809](https://togithub.com/bazelbuild/bazel-gazelle/pull/1809)
- prepare release 0.37.0 by
[@&#8203;tyler-french](https://togithub.com/tyler-french) in
[https://github.com/bazelbuild/bazel-gazelle/pull/1812](https://togithub.com/bazelbuild/bazel-gazelle/pull/1812)

#### New Contributors

- [@&#8203;stefanpenner](https://togithub.com/stefanpenner) made their
first contribution in
[https://github.com/bazelbuild/bazel-gazelle/pull/1780](https://togithub.com/bazelbuild/bazel-gazelle/pull/1780)
- [@&#8203;AugustKarlstedt](https://togithub.com/AugustKarlstedt) made
their first contribution in
[https://github.com/bazelbuild/bazel-gazelle/pull/1795](https://togithub.com/bazelbuild/bazel-gazelle/pull/1795)
- [@&#8203;hunshcn](https://togithub.com/hunshcn) made their first
contribution in
[https://github.com/bazelbuild/bazel-gazelle/pull/1800](https://togithub.com/bazelbuild/bazel-gazelle/pull/1800)
- [@&#8203;EdSchouten](https://togithub.com/EdSchouten) made their first
contribution in
[https://github.com/bazelbuild/bazel-gazelle/pull/1803](https://togithub.com/bazelbuild/bazel-gazelle/pull/1803)
- [@&#8203;davidbyttow](https://togithub.com/davidbyttow) made their
first contribution in
[https://github.com/bazelbuild/bazel-gazelle/pull/1806](https://togithub.com/bazelbuild/bazel-gazelle/pull/1806)
- [@&#8203;pmenglund](https://togithub.com/pmenglund) made their first
contribution in
[https://github.com/bazelbuild/bazel-gazelle/pull/1808](https://togithub.com/bazelbuild/bazel-gazelle/pull/1808)
- [@&#8203;jeromep-stripe](https://togithub.com/jeromep-stripe) made
their first contribution in
[https://github.com/bazelbuild/bazel-gazelle/pull/1765](https://togithub.com/bazelbuild/bazel-gazelle/pull/1765)

**Full Changelog**:
bazelbuild/bazel-gazelle@v0.36.0...v0.37.0

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Enabled.

♻ **Rebasing**: Whenever PR becomes conflicted, 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, check
this box

---

This PR was generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View the
[repository job
log](https://developer.mend.io/github/kreempuff/rules_unreal_engine).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4zNjguMTAiLCJ1cGRhdGVkSW5WZXIiOiIzNy40NDAuNyIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOltdfQ==-->
trunk-io bot referenced this pull request in ride-app/payments-service Aug 1, 2024
[![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.37.0` -> `v0.38.0` |

---

### Release Notes

<details>
<summary>bazelbuild/bazel-gazelle (bazel_gazelle)</summary>

### [`v0.38.0`](https://togithub.com/bazelbuild/bazel-gazelle/releases/tag/v0.38.0)

[Compare Source](https://togithub.com/bazelbuild/bazel-gazelle/compare/v0.37.0...v0.38.0)

#### What's Changed

-   Add support for `include()` in `MODULE.bazel` by [@&#8203;fmeum](https://togithub.com/fmeum) in [https://github.com/bazelbuild/bazel-gazelle/pull/1810](https://togithub.com/bazelbuild/bazel-gazelle/pull/1810)
-   feat: gazelle_test test rule by [@&#8203;hunshcn](https://togithub.com/hunshcn) in [https://github.com/bazelbuild/bazel-gazelle/pull/1785](https://togithub.com/bazelbuild/bazel-gazelle/pull/1785)
-   Handle arm64 host platform for MacOS by [@&#8203;smocherla-brex](https://togithub.com/smocherla-brex) in [https://github.com/bazelbuild/bazel-gazelle/pull/1817](https://togithub.com/bazelbuild/bazel-gazelle/pull/1817)
-   go_repository: add 'clean' build_file_generation by [@&#8203;TvdW](https://togithub.com/TvdW) in [https://github.com/bazelbuild/bazel-gazelle/pull/1802](https://togithub.com/bazelbuild/bazel-gazelle/pull/1802)
-   fix: support leading ./ in .bazelignore by [@&#8203;jbedard](https://togithub.com/jbedard) in [https://github.com/bazelbuild/bazel-gazelle/pull/1828](https://togithub.com/bazelbuild/bazel-gazelle/pull/1828)
-   Restore compatibility with Go 1.18 by [@&#8203;fmeum](https://togithub.com/fmeum) in [https://github.com/bazelbuild/bazel-gazelle/pull/1833](https://togithub.com/bazelbuild/bazel-gazelle/pull/1833)
-   Remove reliance on specific canonical repo name scheme by [@&#8203;fmeum](https://togithub.com/fmeum) in [https://github.com/bazelbuild/bazel-gazelle/pull/1835](https://togithub.com/bazelbuild/bazel-gazelle/pull/1835)
-   temporarily disable `//internal:bazel_test` on Mac to fix CI by [@&#8203;tyler-french](https://togithub.com/tyler-french) in [https://github.com/bazelbuild/bazel-gazelle/pull/1842](https://togithub.com/bazelbuild/bazel-gazelle/pull/1842)
-   update readmes for latest release by [@&#8203;tyler-french](https://togithub.com/tyler-french) in [https://github.com/bazelbuild/bazel-gazelle/pull/1840](https://togithub.com/bazelbuild/bazel-gazelle/pull/1840)
-   \[Gazelle] Fix Duplicate Load Bug by [@&#8203;ckilian867](https://togithub.com/ckilian867) in [https://github.com/bazelbuild/bazel-gazelle/pull/1841](https://togithub.com/bazelbuild/bazel-gazelle/pull/1841)
-   \[Proto] Require space between 'service' and service name in regex matching by [@&#8203;ckilian867](https://togithub.com/ckilian867) in [https://github.com/bazelbuild/bazel-gazelle/pull/1845](https://togithub.com/bazelbuild/bazel-gazelle/pull/1845)
-   \[Proto] Keep track of the names of Services, Messages, and Enums by [@&#8203;ckilian867](https://togithub.com/ckilian867) in [https://github.com/bazelbuild/bazel-gazelle/pull/1844](https://togithub.com/bazelbuild/bazel-gazelle/pull/1844)
-   Always check files in generation tests by [@&#8203;Whoaa512](https://togithub.com/Whoaa512) in [https://github.com/bazelbuild/bazel-gazelle/pull/1847](https://togithub.com/bazelbuild/bazel-gazelle/pull/1847)
-   Support label using regexp in directive `gazelle:resolve_regexp` by [@&#8203;lkassar-stripe](https://togithub.com/lkassar-stripe) in [https://github.com/bazelbuild/bazel-gazelle/pull/1822](https://togithub.com/bazelbuild/bazel-gazelle/pull/1822)
-   Add `external/...` prefix to `${SRCDIR}` in external repos by [@&#8203;fmeum](https://togithub.com/fmeum) in [https://github.com/bazelbuild/bazel-gazelle/pull/1850](https://togithub.com/bazelbuild/bazel-gazelle/pull/1850)
-   feat(tools): add a tool to automate the generation of go_deps overrides by [@&#8203;tyler-french](https://togithub.com/tyler-french) in [https://github.com/bazelbuild/bazel-gazelle/pull/1677](https://togithub.com/bazelbuild/bazel-gazelle/pull/1677)
-   prepare release 0.38 by [@&#8203;tyler-french](https://togithub.com/tyler-french) in [https://github.com/bazelbuild/bazel-gazelle/pull/1849](https://togithub.com/bazelbuild/bazel-gazelle/pull/1849)

#### New Contributors

-   [@&#8203;smocherla-brex](https://togithub.com/smocherla-brex) made their first contribution in [https://github.com/bazelbuild/bazel-gazelle/pull/1817](https://togithub.com/bazelbuild/bazel-gazelle/pull/1817)
-   [@&#8203;TvdW](https://togithub.com/TvdW) made their first contribution in [https://github.com/bazelbuild/bazel-gazelle/pull/1802](https://togithub.com/bazelbuild/bazel-gazelle/pull/1802)
-   [@&#8203;ckilian867](https://togithub.com/ckilian867) made their first contribution in [https://github.com/bazelbuild/bazel-gazelle/pull/1841](https://togithub.com/bazelbuild/bazel-gazelle/pull/1841)
-   [@&#8203;lkassar-stripe](https://togithub.com/lkassar-stripe) made their first contribution in [https://github.com/bazelbuild/bazel-gazelle/pull/1822](https://togithub.com/bazelbuild/bazel-gazelle/pull/1822)

**Full Changelog**: bazelbuild/bazel-gazelle@v0.37.0...v0.38.0

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Enabled.

♻ **Rebasing**: Whenever PR becomes conflicted, 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, check this box

---

This PR was generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View the [repository job log](https://developer.mend.io/github/ride-app/payments-service).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy40NDAuNyIsInVwZGF0ZWRJblZlciI6IjM3LjQ0MC43IiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->
mergify bot referenced this pull request in cgrindel/rules_swift_package_manager Sep 21, 2024
….0 (#1238)

This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
|
[github.com/bazelbuild/bazel-gazelle](https://redirect.github.com/bazelbuild/bazel-gazelle)
| require | minor | `v0.37.0` -> `v0.38.0` |

---

### Release Notes

<details>
<summary>bazelbuild/bazel-gazelle
(github.com/bazelbuild/bazel-gazelle)</summary>

###
[`v0.38.0`](https://redirect.github.com/bazelbuild/bazel-gazelle/releases/tag/v0.38.0)

[Compare
Source](https://redirect.github.com/bazelbuild/bazel-gazelle/compare/v0.37.0...v0.38.0)

#### What's Changed

- Add support for `include()` in `MODULE.bazel` by
[@&#8203;fmeum](https://redirect.github.com/fmeum) in
[https://github.com/bazelbuild/bazel-gazelle/pull/1810](https://redirect.github.com/bazelbuild/bazel-gazelle/pull/1810)
- feat: gazelle_test test rule by
[@&#8203;hunshcn](https://redirect.github.com/hunshcn) in
[https://github.com/bazelbuild/bazel-gazelle/pull/1785](https://redirect.github.com/bazelbuild/bazel-gazelle/pull/1785)
- Handle arm64 host platform for MacOS by
[@&#8203;smocherla-brex](https://redirect.github.com/smocherla-brex) in
[https://github.com/bazelbuild/bazel-gazelle/pull/1817](https://redirect.github.com/bazelbuild/bazel-gazelle/pull/1817)
- go_repository: add 'clean' build_file_generation by
[@&#8203;TvdW](https://redirect.github.com/TvdW) in
[https://github.com/bazelbuild/bazel-gazelle/pull/1802](https://redirect.github.com/bazelbuild/bazel-gazelle/pull/1802)
- fix: support leading ./ in .bazelignore by
[@&#8203;jbedard](https://redirect.github.com/jbedard) in
[https://github.com/bazelbuild/bazel-gazelle/pull/1828](https://redirect.github.com/bazelbuild/bazel-gazelle/pull/1828)
- Restore compatibility with Go 1.18 by
[@&#8203;fmeum](https://redirect.github.com/fmeum) in
[https://github.com/bazelbuild/bazel-gazelle/pull/1833](https://redirect.github.com/bazelbuild/bazel-gazelle/pull/1833)
- Remove reliance on specific canonical repo name scheme by
[@&#8203;fmeum](https://redirect.github.com/fmeum) in
[https://github.com/bazelbuild/bazel-gazelle/pull/1835](https://redirect.github.com/bazelbuild/bazel-gazelle/pull/1835)
- temporarily disable `//internal:bazel_test` on Mac to fix CI by
[@&#8203;tyler-french](https://redirect.github.com/tyler-french) in
[https://github.com/bazelbuild/bazel-gazelle/pull/1842](https://redirect.github.com/bazelbuild/bazel-gazelle/pull/1842)
- update readmes for latest release by
[@&#8203;tyler-french](https://redirect.github.com/tyler-french) in
[https://github.com/bazelbuild/bazel-gazelle/pull/1840](https://redirect.github.com/bazelbuild/bazel-gazelle/pull/1840)
- \[Gazelle] Fix Duplicate Load Bug by
[@&#8203;ckilian867](https://redirect.github.com/ckilian867) in
[https://github.com/bazelbuild/bazel-gazelle/pull/1841](https://redirect.github.com/bazelbuild/bazel-gazelle/pull/1841)
- \[Proto] Require space between 'service' and service name in regex
matching by [@&#8203;ckilian867](https://redirect.github.com/ckilian867)
in
[https://github.com/bazelbuild/bazel-gazelle/pull/1845](https://redirect.github.com/bazelbuild/bazel-gazelle/pull/1845)
- \[Proto] Keep track of the names of Services, Messages, and Enums by
[@&#8203;ckilian867](https://redirect.github.com/ckilian867) in
[https://github.com/bazelbuild/bazel-gazelle/pull/1844](https://redirect.github.com/bazelbuild/bazel-gazelle/pull/1844)
- Always check files in generation tests by
[@&#8203;Whoaa512](https://redirect.github.com/Whoaa512) in
[https://github.com/bazelbuild/bazel-gazelle/pull/1847](https://redirect.github.com/bazelbuild/bazel-gazelle/pull/1847)
- Support label using regexp in directive `gazelle:resolve_regexp` by
[@&#8203;lkassar-stripe](https://redirect.github.com/lkassar-stripe) in
[https://github.com/bazelbuild/bazel-gazelle/pull/1822](https://redirect.github.com/bazelbuild/bazel-gazelle/pull/1822)
- Add `external/...` prefix to `${SRCDIR}` in external repos by
[@&#8203;fmeum](https://redirect.github.com/fmeum) in
[https://github.com/bazelbuild/bazel-gazelle/pull/1850](https://redirect.github.com/bazelbuild/bazel-gazelle/pull/1850)
- feat(tools): add a tool to automate the generation of go_deps
overrides by
[@&#8203;tyler-french](https://redirect.github.com/tyler-french) in
[https://github.com/bazelbuild/bazel-gazelle/pull/1677](https://redirect.github.com/bazelbuild/bazel-gazelle/pull/1677)
- prepare release 0.38 by
[@&#8203;tyler-french](https://redirect.github.com/tyler-french) in
[https://github.com/bazelbuild/bazel-gazelle/pull/1849](https://redirect.github.com/bazelbuild/bazel-gazelle/pull/1849)

#### New Contributors

- [@&#8203;smocherla-brex](https://redirect.github.com/smocherla-brex)
made their first contribution in
[https://github.com/bazelbuild/bazel-gazelle/pull/1817](https://redirect.github.com/bazelbuild/bazel-gazelle/pull/1817)
- [@&#8203;TvdW](https://redirect.github.com/TvdW) made their first
contribution in
[https://github.com/bazelbuild/bazel-gazelle/pull/1802](https://redirect.github.com/bazelbuild/bazel-gazelle/pull/1802)
- [@&#8203;ckilian867](https://redirect.github.com/ckilian867) made
their first contribution in
[https://github.com/bazelbuild/bazel-gazelle/pull/1841](https://redirect.github.com/bazelbuild/bazel-gazelle/pull/1841)
- [@&#8203;lkassar-stripe](https://redirect.github.com/lkassar-stripe)
made their first contribution in
[https://github.com/bazelbuild/bazel-gazelle/pull/1822](https://redirect.github.com/bazelbuild/bazel-gazelle/pull/1822)

**Full Changelog**:
bazelbuild/bazel-gazelle@v0.37.0...v0.38.0

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Enabled.

♻ **Rebasing**: Whenever PR is behind base branch, or you tick the
rebase/retry checkbox.

👻 **Immortal**: This PR will be recreated if closed unmerged. Get
[config
help](https://redirect.github.com/renovatebot/renovate/discussions) if
that's undesired.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Renovate
Bot](https://redirect.github.com/renovatebot/renovate).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOC44NC4wIiwidXBkYXRlZEluVmVyIjoiMzguODQuMCIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOltdfQ==-->

---------

Co-authored-by: cgrindel-self-hosted-renovate[bot] <139595543+cgrindel-self-hosted-renovate[bot]@users.noreply.github.com>
Co-authored-by: Chuck Grindel <chuck.grindel@gmail.com>
cgrindel-self-hosted-renovate bot referenced this pull request in cgrindel/rules_swift_package_manager Sep 23, 2024
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [bazel_gazelle](https://redirect.github.com/bazelbuild/bazel-gazelle)
| http_archive | minor | `v0.37.0` -> `v0.38.0` |

---

### Release Notes

<details>
<summary>bazelbuild/bazel-gazelle (bazel_gazelle)</summary>

###
[`v0.38.0`](https://redirect.github.com/bazelbuild/bazel-gazelle/releases/tag/v0.38.0)

[Compare
Source](https://redirect.github.com/bazelbuild/bazel-gazelle/compare/v0.37.0...v0.38.0)

#### What's Changed

- Add support for `include()` in `MODULE.bazel` by
[@&#8203;fmeum](https://redirect.github.com/fmeum) in
[https://github.com/bazelbuild/bazel-gazelle/pull/1810](https://redirect.github.com/bazelbuild/bazel-gazelle/pull/1810)
- feat: gazelle_test test rule by
[@&#8203;hunshcn](https://redirect.github.com/hunshcn) in
[https://github.com/bazelbuild/bazel-gazelle/pull/1785](https://redirect.github.com/bazelbuild/bazel-gazelle/pull/1785)
- Handle arm64 host platform for MacOS by
[@&#8203;smocherla-brex](https://redirect.github.com/smocherla-brex) in
[https://github.com/bazelbuild/bazel-gazelle/pull/1817](https://redirect.github.com/bazelbuild/bazel-gazelle/pull/1817)
- go_repository: add 'clean' build_file_generation by
[@&#8203;TvdW](https://redirect.github.com/TvdW) in
[https://github.com/bazelbuild/bazel-gazelle/pull/1802](https://redirect.github.com/bazelbuild/bazel-gazelle/pull/1802)
- fix: support leading ./ in .bazelignore by
[@&#8203;jbedard](https://redirect.github.com/jbedard) in
[https://github.com/bazelbuild/bazel-gazelle/pull/1828](https://redirect.github.com/bazelbuild/bazel-gazelle/pull/1828)
- Restore compatibility with Go 1.18 by
[@&#8203;fmeum](https://redirect.github.com/fmeum) in
[https://github.com/bazelbuild/bazel-gazelle/pull/1833](https://redirect.github.com/bazelbuild/bazel-gazelle/pull/1833)
- Remove reliance on specific canonical repo name scheme by
[@&#8203;fmeum](https://redirect.github.com/fmeum) in
[https://github.com/bazelbuild/bazel-gazelle/pull/1835](https://redirect.github.com/bazelbuild/bazel-gazelle/pull/1835)
- temporarily disable `//internal:bazel_test` on Mac to fix CI by
[@&#8203;tyler-french](https://redirect.github.com/tyler-french) in
[https://github.com/bazelbuild/bazel-gazelle/pull/1842](https://redirect.github.com/bazelbuild/bazel-gazelle/pull/1842)
- update readmes for latest release by
[@&#8203;tyler-french](https://redirect.github.com/tyler-french) in
[https://github.com/bazelbuild/bazel-gazelle/pull/1840](https://redirect.github.com/bazelbuild/bazel-gazelle/pull/1840)
- \[Gazelle] Fix Duplicate Load Bug by
[@&#8203;ckilian867](https://redirect.github.com/ckilian867) in
[https://github.com/bazelbuild/bazel-gazelle/pull/1841](https://redirect.github.com/bazelbuild/bazel-gazelle/pull/1841)
- \[Proto] Require space between 'service' and service name in regex
matching by [@&#8203;ckilian867](https://redirect.github.com/ckilian867)
in
[https://github.com/bazelbuild/bazel-gazelle/pull/1845](https://redirect.github.com/bazelbuild/bazel-gazelle/pull/1845)
- \[Proto] Keep track of the names of Services, Messages, and Enums by
[@&#8203;ckilian867](https://redirect.github.com/ckilian867) in
[https://github.com/bazelbuild/bazel-gazelle/pull/1844](https://redirect.github.com/bazelbuild/bazel-gazelle/pull/1844)
- Always check files in generation tests by
[@&#8203;Whoaa512](https://redirect.github.com/Whoaa512) in
[https://github.com/bazelbuild/bazel-gazelle/pull/1847](https://redirect.github.com/bazelbuild/bazel-gazelle/pull/1847)
- Support label using regexp in directive `gazelle:resolve_regexp` by
[@&#8203;lkassar-stripe](https://redirect.github.com/lkassar-stripe) in
[https://github.com/bazelbuild/bazel-gazelle/pull/1822](https://redirect.github.com/bazelbuild/bazel-gazelle/pull/1822)
- Add `external/...` prefix to `${SRCDIR}` in external repos by
[@&#8203;fmeum](https://redirect.github.com/fmeum) in
[https://github.com/bazelbuild/bazel-gazelle/pull/1850](https://redirect.github.com/bazelbuild/bazel-gazelle/pull/1850)
- feat(tools): add a tool to automate the generation of go_deps
overrides by
[@&#8203;tyler-french](https://redirect.github.com/tyler-french) in
[https://github.com/bazelbuild/bazel-gazelle/pull/1677](https://redirect.github.com/bazelbuild/bazel-gazelle/pull/1677)
- prepare release 0.38 by
[@&#8203;tyler-french](https://redirect.github.com/tyler-french) in
[https://github.com/bazelbuild/bazel-gazelle/pull/1849](https://redirect.github.com/bazelbuild/bazel-gazelle/pull/1849)

#### New Contributors

- [@&#8203;smocherla-brex](https://redirect.github.com/smocherla-brex)
made their first contribution in
[https://github.com/bazelbuild/bazel-gazelle/pull/1817](https://redirect.github.com/bazelbuild/bazel-gazelle/pull/1817)
- [@&#8203;TvdW](https://redirect.github.com/TvdW) made their first
contribution in
[https://github.com/bazelbuild/bazel-gazelle/pull/1802](https://redirect.github.com/bazelbuild/bazel-gazelle/pull/1802)
- [@&#8203;ckilian867](https://redirect.github.com/ckilian867) made
their first contribution in
[https://github.com/bazelbuild/bazel-gazelle/pull/1841](https://redirect.github.com/bazelbuild/bazel-gazelle/pull/1841)
- [@&#8203;lkassar-stripe](https://redirect.github.com/lkassar-stripe)
made their first contribution in
[https://github.com/bazelbuild/bazel-gazelle/pull/1822](https://redirect.github.com/bazelbuild/bazel-gazelle/pull/1822)

**Full Changelog**:
bazelbuild/bazel-gazelle@v0.37.0...v0.38.0

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Enabled.

♻ **Rebasing**: Whenever PR is behind base branch, or you tick the
rebase/retry checkbox.

👻 **Immortal**: This PR will be recreated if closed unmerged. Get
[config
help](https://redirect.github.com/renovatebot/renovate/discussions) if
that's undesired.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Renovate
Bot](https://redirect.github.com/renovatebot/renovate).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOC45My4wIiwidXBkYXRlZEluVmVyIjoiMzguOTMuMCIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOltdfQ==-->

Co-authored-by: cgrindel-self-hosted-renovate[bot] <139595543+cgrindel-self-hosted-renovate[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Expose bazel_deps to go_deps extension
2 participants