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

Add support for include() in MODULE.bazel #1810

Merged
merged 3 commits into from
May 29, 2024
Merged

Add support for include() in MODULE.bazel #1810

merged 3 commits into from
May 29, 2024

Conversation

fmeum
Copy link
Collaborator

@fmeum fmeum commented May 21, 2024

What type of PR is this?

Bug fix

What package or component does this PR mostly affect?

cmd/gazelle

What does this PR do? Why is it needed?

Previously, gazelle wouldn't look into includeed segments of module files when collecting the apparent to module name mapping.

Which issues(s) does this PR fix?

Fixes #1804

Other notes for review

@fmeum
Copy link
Collaborator Author

fmeum commented May 21, 2024

@mortenmj Could you test this?

@tyler-french
Copy link
Contributor

Tested at Uber with Bazel 7.1.1

@fmeum fmeum enabled auto-merge (squash) May 28, 2024 20:49
@fmeum fmeum disabled auto-merge May 28, 2024 20:49
@fmeum fmeum force-pushed the 1804-include branch 2 times, most recently from 1a9cb50 to f6e41bf Compare May 28, 2024 21:23
@fmeum fmeum enabled auto-merge (squash) May 28, 2024 21:24
fmeum added 2 commits May 29, 2024 00:13
Previously, `gazelle` wouldn't look into `include`ed segments of module files when collecting the apparent to module name mapping.
@fmeum fmeum merged commit f738979 into master May 29, 2024
17 checks passed
@fmeum fmeum deleted the 1804-include branch May 29, 2024 22:20
renovate bot added a commit to kreempuff/rules_unreal_engine that referenced this pull request 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
[bazelbuild/bazel-gazelle#1810
- feat: gazelle_test test rule by
[@&#8203;hunshcn](https://togithub.com/hunshcn) in
[bazelbuild/bazel-gazelle#1785
- Handle arm64 host platform for MacOS by
[@&#8203;smocherla-brex](https://togithub.com/smocherla-brex) in
[bazelbuild/bazel-gazelle#1817
- go_repository: add 'clean' build_file_generation by
[@&#8203;TvdW](https://togithub.com/TvdW) in
[bazelbuild/bazel-gazelle#1802
- fix: support leading ./ in .bazelignore by
[@&#8203;jbedard](https://togithub.com/jbedard) in
[bazelbuild/bazel-gazelle#1828
- Restore compatibility with Go 1.18 by
[@&#8203;fmeum](https://togithub.com/fmeum) in
[bazelbuild/bazel-gazelle#1833
- Remove reliance on specific canonical repo name scheme by
[@&#8203;fmeum](https://togithub.com/fmeum) in
[bazelbuild/bazel-gazelle#1835
- temporarily disable `//internal:bazel_test` on Mac to fix CI by
[@&#8203;tyler-french](https://togithub.com/tyler-french) in
[bazelbuild/bazel-gazelle#1842
- update readmes for latest release by
[@&#8203;tyler-french](https://togithub.com/tyler-french) in
[bazelbuild/bazel-gazelle#1840
- \[Gazelle] Fix Duplicate Load Bug by
[@&#8203;ckilian867](https://togithub.com/ckilian867) in
[bazelbuild/bazel-gazelle#1841
- \[Proto] Require space between 'service' and service name in regex
matching by [@&#8203;ckilian867](https://togithub.com/ckilian867) in
[bazelbuild/bazel-gazelle#1845
- \[Proto] Keep track of the names of Services, Messages, and Enums by
[@&#8203;ckilian867](https://togithub.com/ckilian867) in
[bazelbuild/bazel-gazelle#1844
- Always check files in generation tests by
[@&#8203;Whoaa512](https://togithub.com/Whoaa512) in
[bazelbuild/bazel-gazelle#1847
- Support label using regexp in directive `gazelle:resolve_regexp` by
[@&#8203;lkassar-stripe](https://togithub.com/lkassar-stripe) in
[bazelbuild/bazel-gazelle#1822
- Add `external/...` prefix to `${SRCDIR}` in external repos by
[@&#8203;fmeum](https://togithub.com/fmeum) in
[bazelbuild/bazel-gazelle#1850
- feat(tools): add a tool to automate the generation of go_deps
overrides by [@&#8203;tyler-french](https://togithub.com/tyler-french)
in
[bazelbuild/bazel-gazelle#1677
- prepare release 0.38 by
[@&#8203;tyler-french](https://togithub.com/tyler-french) in
[bazelbuild/bazel-gazelle#1849

#### New Contributors

- [@&#8203;smocherla-brex](https://togithub.com/smocherla-brex) made
their first contribution in
[bazelbuild/bazel-gazelle#1817
- [@&#8203;TvdW](https://togithub.com/TvdW) made their first
contribution in
[bazelbuild/bazel-gazelle#1802
- [@&#8203;ckilian867](https://togithub.com/ckilian867) made their first
contribution in
[bazelbuild/bazel-gazelle#1841
- [@&#8203;lkassar-stripe](https://togithub.com/lkassar-stripe) made
their first contribution in
[bazelbuild/bazel-gazelle#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
[bazelbuild/bazel-gazelle#1722
- Add a pointer to bzlmod guide by
[@&#8203;sluongng](https://togithub.com/sluongng) in
[bazelbuild/bazel-gazelle#1781
- \[Extraction] prep for go.mod & go.work FilePath ReplaceDirective work
by [@&#8203;stefanpenner](https://togithub.com/stefanpenner) in
[bazelbuild/bazel-gazelle#1780
- \[cmd/fetch_repo] make cache corruption failures more clear by
[@&#8203;tyler-french](https://togithub.com/tyler-french) in
[bazelbuild/bazel-gazelle#1782
- Nit: pass -modcacherw in exec.Command. by
[@&#8203;hauserx](https://togithub.com/hauserx) in
[bazelbuild/bazel-gazelle#1784
- Mention JS extension in Aspect CLI by
[@&#8203;alexeagle](https://togithub.com/alexeagle) in
[bazelbuild/bazel-gazelle#1646
- \[Feature] bzlmod & go.work by
[@&#8203;stefanpenner](https://togithub.com/stefanpenner) in
[bazelbuild/bazel-gazelle#1731
- Add GIT_CONFIG_\* env vars to go_repository allow-list by
[@&#8203;mortenmj](https://togithub.com/mortenmj) in
[bazelbuild/bazel-gazelle#1791
- Reformat with latest buildifier by
[@&#8203;fmeum](https://togithub.com/fmeum) in
[bazelbuild/bazel-gazelle#1792
- \[Feature] go.mod FilePath ReplaceDirective Support by
[@&#8203;stefanpenner](https://togithub.com/stefanpenner) in
[bazelbuild/bazel-gazelle#1776
- Fix README.rst by
[@&#8203;AugustKarlstedt](https://togithub.com/AugustKarlstedt) in
[bazelbuild/bazel-gazelle#1795
- Update README.rst by
[@&#8203;AugustKarlstedt](https://togithub.com/AugustKarlstedt) in
[bazelbuild/bazel-gazelle#1796
- Normalise newlines on Windows by
[@&#8203;illicitonion](https://togithub.com/illicitonion) in
[bazelbuild/bazel-gazelle#1798
- Fix go.work use ROOT moddir by
[@&#8203;hunshcn](https://togithub.com/hunshcn) in
[bazelbuild/bazel-gazelle#1800
- allow go_visibility directive to change command package's visibility
by [@&#8203;hunshcn](https://togithub.com/hunshcn) in
[bazelbuild/bazel-gazelle#1794
- Ensure the Gazelle binary is built for the right platform by
[@&#8203;EdSchouten](https://togithub.com/EdSchouten) in
[bazelbuild/bazel-gazelle#1803
- Add support for `debug_mode` option to `go_deps` by
[@&#8203;davidbyttow](https://togithub.com/davidbyttow) in
[bazelbuild/bazel-gazelle#1806
- Remove special resolution of go_proto imports by
[@&#8203;linzhp](https://togithub.com/linzhp) in
[bazelbuild/bazel-gazelle#1807
- address nogo complaints about variable shadowing by
[@&#8203;pmenglund](https://togithub.com/pmenglund) in
[bazelbuild/bazel-gazelle#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
[bazelbuild/bazel-gazelle#1765
- go_deps: ignore go.work toolchain directive by
[@&#8203;malt3](https://togithub.com/malt3) in
[bazelbuild/bazel-gazelle#1809
- prepare release 0.37.0 by
[@&#8203;tyler-french](https://togithub.com/tyler-french) in
[bazelbuild/bazel-gazelle#1812

#### New Contributors

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

#### New Contributors

-   [@&#8203;smocherla-brex](https://togithub.com/smocherla-brex) made their first contribution in [bazelbuild/bazel-gazelle#1817
-   [@&#8203;TvdW](https://togithub.com/TvdW) made their first contribution in [bazelbuild/bazel-gazelle#1802
-   [@&#8203;ckilian867](https://togithub.com/ckilian867) made their first contribution in [bazelbuild/bazel-gazelle#1841
-   [@&#8203;lkassar-stripe](https://togithub.com/lkassar-stripe) made their first contribution in [bazelbuild/bazel-gazelle#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-->
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.

Gazelle should extract module mappings from imported foo.MODULE.bazel files
2 participants