Skip to content

Ignore symlinks into Bazel output rather than relying on name #1384

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

Merged

Conversation

cpsauer
Copy link
Contributor

@cpsauer cpsauer commented Nov 29, 2022

Hi wonderful Bazelers,

This PR is somewhere between a bug fix and a feature. It generalizes existing functionality that is missing some cases.

It's focused on the walk package's auto-ignoring of symlinks.

Right now, Gazelle will happily traverse symlinks into bazel's output base, so long as they don't start with bazel-*. This is a problem because IDE adapters often create such symlinks. I know Tulsi does, for example, and a user just reported this issue over at a tool I maintain. Since I could see where the issue was, I figured I'd take a quick shot at proposing a fix, despite not currently being a Gazelle or go user. (So please have patience with me :) It seemed worth fixing the default since Gazelle could write a considerable number of files before the user realized what was going on.

This PR also makes progress towards fixing #168, removing the dependence on a bazel-* prefix for the ignoring convenience symlinks, instead ignoring a more general class. However, a full fix to #168 will require more work and wasn't the intent; this is an incremental, separate improvement, just written in such a way as to set the stage for future improvements there. I'll save state into that issue, but note that the output_base resolving code will likely be swapped out then.

I should also note: The deleted comment in repo.go is intentional. The current behavior of --symlink_prefix has changed to also rename bazel-out. I'm also skeptical that the neighboring, similar, symlink resolution code will work on windows; hence the use of Dir in my implementation. In my (python) experience, .. traverses back out of a Windows junction the way it came, as opposed to getting the parent of the symlinks destination, as on posix. But this problematic code will get removed when #168 gets fixed some day.
One final note: The reordering of the default behavior behind the user override is also intentional. It's more consistent with the other automatic defaults and gives the user an escape hatch if they really want it.

Thanks for reading!
Chris
(ex-Googler)

Edit: Now fixes #168

@cpsauer cpsauer force-pushed the ignore-symlinks-into-bazel-output branch from 95070a7 to 3dd09e6 Compare November 30, 2022 00:43
@cpsauer
Copy link
Contributor Author

cpsauer commented Dec 8, 2022

Tagging @jayconrod, since it looks like he last reviewed changes to this file. Hope that's ok.

@cpsauer
Copy link
Contributor Author

cpsauer commented Jan 3, 2023

@fmeum or @linzhp, could I ask for you to review/approve this one, since it looks like you're the one's who've been active here recently and it's been silent a while (and since @fmeum, we've worked together in the past)

walk/walk.go Outdated
// <output-base>/execroot/<workspace-name>/bazel-out
// See https://docs.bazel.build/versions/master/output_directories.html
// for documentation on Bazel directory layout.
bazelOut, err := filepath.EvalSymlinks(filepath.Join(c.RepoRoot, "bazel-out"))
Copy link
Member

Choose a reason for hiding this comment

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

This introduces a new dependency on the value of --symlink_prefix and also means that symlinks into the output base are still followed if the convenience symlinks aren't created (which is more likely with the new algorithm used in Bazel 6).

@cpsauer @linzhp Do you think we could instead decline to follow any symlinks that point out of the project directory? That is a condition that needs no external information to be evaluated.

Copy link
Contributor

Choose a reason for hiding this comment

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

Yeah, I think that's a fair requirement

Copy link
Contributor

Choose a reason for hiding this comment

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

Unfortunately, I think the main use case for following symlinks was stitching together multiple repos into something that looks like a coherent workspace. It is probably necessary to follow symlinks outside the repo and outside the workspace root to avoid a regression.

Copy link
Contributor

@jayconrod jayconrod left a comment

Choose a reason for hiding this comment

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

Sorry for the delayed review; I think my GitHub notification settings are messed up.

Some history: symbolic links create problems for anything walking a directory tree, and it's generally best to treat them like regular files and not follow them. Unlike, filepath.Walk Gazelle does not take that advice. I think the reasons were:

  • Kubernetes does some shenanigans with their vendor and staging directories. It looks like this is still the case.
  • The person who originally contributed this functionality had separate repos for public and private code. They had been separate GOPATH directories. They wanted Gazelle to work, stitching the two repos together with symbolic links.
    • Up to the current maintainers whether you want to maintain this use case or break it. I wish I had said No to that PR since it made everything more complicated for the benefit of one organization.

So the main question is whether it's possible for Gazelle to tell if a symbolic link points inside Bazel's output base without running Bazel. Given --symlink_prefix and changes in new versions of Bazel, it probably can't be done perfectly without running bazel info output_base.

But maybe ignoring symbolic links that point inside a small number of output directories would be good enough? On macOS, bazel info output_base is always in /private/var/tmp/_bazel_$USER. On Linux, it's in $HOME/.cache/bazel/_bazel_$USER.

walk/walk.go Outdated
// <output-base>/execroot/<workspace-name>/bazel-out
// See https://docs.bazel.build/versions/master/output_directories.html
// for documentation on Bazel directory layout.
bazelOut, err := filepath.EvalSymlinks(filepath.Join(c.RepoRoot, "bazel-out"))
Copy link
Contributor

Choose a reason for hiding this comment

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

Unfortunately, I think the main use case for following symlinks was stitching together multiple repos into something that looks like a coherent workspace. It is probably necessary to follow symlinks outside the repo and outside the workspace root to avoid a regression.

@linzhp
Copy link
Contributor

linzhp commented Jan 4, 2023

Up to the current maintainers whether you want to maintain this use case or break it.

I am OK with breaking it. Stitching two repos together using symlinks sounds more like a hack to me than legit scenario.

The person who originally contributed this functionality had separate repos for public and private code. They had been separate GOPATH directories. They wanted Gazelle to work, stitching the two repos together with symbolic links.

I think they should instead make them two Go modules and have the private module importing the public module.

@cpsauer
Copy link
Contributor Author

cpsauer commented Jan 13, 2023

Hey, guys! Thanks for getting back to me.

Just to clarify: Is the decision to get rid of all symlink traversal?
(Vs. just those pointing out of the workspace, also mentioned.)

[I should also note that, after more thought, I'm realizing that even bazel info output_base wouldn't get things perfectly, since, for example, the user could be specifying the output base as a flag instead of in .bazelrc. Using the fixed locations has a similar problem.]

Again, just here trying to help as a non-current user, so please forgive my ignorance--it's unclear how this would interact with, e.g. external repos that symlink things in.

If the decision is to not traverse symlinks at all, and it's obvious to you guys what code to strip, feel free to just close this and go for it--might be faster and save a RTT and it's not that related to the original diff. Might want to preserve the comment change in repo.go, though.

@cpsauer
Copy link
Contributor Author

cpsauer commented Feb 11, 2023

(Friendly bump.)

@linzhp
Copy link
Contributor

linzhp commented Feb 12, 2023

Sorry for the delay. I am OK with a breaking change to disallow following symlinks all together, or a minor version of not following symlinks outside project directory like @fmeum suggested.

cpsauer added a commit to cpsauer/bazel-gazelle that referenced this pull request Feb 13, 2023
cpsauer added a commit to cpsauer/bazel-gazelle that referenced this pull request Feb 13, 2023
@cpsauer cpsauer force-pushed the ignore-symlinks-into-bazel-output branch from 1073985 to 7fd0fb7 Compare February 13, 2023 07:40
cpsauer added a commit to cpsauer/bazel-gazelle that referenced this pull request Feb 13, 2023
@cpsauer cpsauer force-pushed the ignore-symlinks-into-bazel-output branch from 7fd0fb7 to e2140cc Compare February 13, 2023 07:42
@cpsauer cpsauer force-pushed the ignore-symlinks-into-bazel-output branch from e2140cc to df20d2e Compare February 13, 2023 07:47
@cpsauer
Copy link
Contributor Author

cpsauer commented Feb 13, 2023

np. Thanks for replying to clarify, guys!

How's this for skipping symlinks altogether?

I think this'd also solve #168 in this form, so I've marked it as such.

@linzhp linzhp merged commit 35d4667 into bazel-contrib:master Feb 14, 2023
@cpsauer
Copy link
Contributor Author

cpsauer commented Feb 14, 2023

Sweet! Thanks. Glad it looks good to you

@cpsauer
Copy link
Contributor Author

cpsauer commented Feb 14, 2023

Before I bounce, friendly reminder about the (separate but likely) problem with FindExternalRepo's handling of Windows junctions, that I'd happened upon while editing. No pressure to fix for me or anything--do with it what you want--but figure I ought to surface things I see.

I'm also skeptical that the neighboring, similar, symlink resolution code will work on windows; hence the use of Dir in my implementation. In my (python) experience, .. traverses back out of a Windows junction the way it came, as opposed to getting the parent of the symlinks destination, as on posix.
^ Fixing would require syscalls, ofc, but that seems likely worth it.

cpsauer added a commit to hedronvision/bazel-compile-commands-extractor that referenced this pull request Feb 14, 2023
renovate bot referenced this pull request in cgrindel/bazel-starlib Mar 31, 2023
[![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.29.0` -> `v0.30.0` |

---

### Release Notes

<details>
<summary>bazelbuild/bazel-gazelle</summary>

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

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

#### What's Changed

- fix: add missing Starlark dependency and introduce `bzl_test` by
[@&#8203;cgrindel](https://togithub.com/cgrindel) in
[https://github.com/bazelbuild/bazel-gazelle/pull/1413](https://togithub.com/bazelbuild/bazel-gazelle/pull/1413)
- Upgrade rules_go and known imports by
[@&#8203;linzhp](https://togithub.com/linzhp) in
[https://github.com/bazelbuild/bazel-gazelle/pull/1426](https://togithub.com/bazelbuild/bazel-gazelle/pull/1426)
- Regenerate known imports from downgraded go_googleapis by
[@&#8203;linzhp](https://togithub.com/linzhp) in
[https://github.com/bazelbuild/bazel-gazelle/pull/1429](https://togithub.com/bazelbuild/bazel-gazelle/pull/1429)
- testdata with buildable Go pkg deep below by
[@&#8203;linzhp](https://togithub.com/linzhp) in
[https://github.com/bazelbuild/bazel-gazelle/pull/1433](https://togithub.com/bazelbuild/bazel-gazelle/pull/1433)
- language/go: add //go:embed all:<pattern> support by
[@&#8203;mbicz](https://togithub.com/mbicz) in
[https://github.com/bazelbuild/bazel-gazelle/pull/1432](https://togithub.com/bazelbuild/bazel-gazelle/pull/1432)
- Fix `go mod download` output expectation for errors by
[@&#8203;illicitonion](https://togithub.com/illicitonion) in
[https://github.com/bazelbuild/bazel-gazelle/pull/1442](https://togithub.com/bazelbuild/bazel-gazelle/pull/1442)
- Apply map_kind to existing rules as well as new ones by
[@&#8203;illicitonion](https://togithub.com/illicitonion) in
[https://github.com/bazelbuild/bazel-gazelle/pull/1425](https://togithub.com/bazelbuild/bazel-gazelle/pull/1425)
- Ignore symlinks into Bazel output rather than relying on name by
[@&#8203;cpsauer](https://togithub.com/cpsauer) in
[https://github.com/bazelbuild/bazel-gazelle/pull/1384](https://togithub.com/bazelbuild/bazel-gazelle/pull/1384)
- Use `short_path` for `go` in the wrapper by
[@&#8203;fmeum](https://togithub.com/fmeum) in
[https://github.com/bazelbuild/bazel-gazelle/pull/1446](https://togithub.com/bazelbuild/bazel-gazelle/pull/1446)
- feature: gazelle wrapper allows to pass environment variables by
[@&#8203;manuelnaranjo](https://togithub.com/manuelnaranjo) in
[https://github.com/bazelbuild/bazel-gazelle/pull/1438](https://togithub.com/bazelbuild/bazel-gazelle/pull/1438)
- Update directive documentation by
[@&#8203;moisesvega](https://togithub.com/moisesvega) in
[https://github.com/bazelbuild/bazel-gazelle/pull/1454](https://togithub.com/bazelbuild/bazel-gazelle/pull/1454)
- Update gazelle directive documenmtation. by
[@&#8203;moisesvega](https://togithub.com/moisesvega) in
[https://github.com/bazelbuild/bazel-gazelle/pull/1455](https://togithub.com/bazelbuild/bazel-gazelle/pull/1455)
- Default Visibility extension overwrite on descent (fixes
[#&#8203;1467](https://togithub.com/bazelbuild/bazel-gazelle/issues/1467))
by [@&#8203;dnathe4th](https://togithub.com/dnathe4th) in
[https://github.com/bazelbuild/bazel-gazelle/pull/1472](https://togithub.com/bazelbuild/bazel-gazelle/pull/1472)
- Allow keep to be explained by
[@&#8203;stevebarrau](https://togithub.com/stevebarrau) in
[https://github.com/bazelbuild/bazel-gazelle/pull/1447](https://togithub.com/bazelbuild/bazel-gazelle/pull/1447)
- Respect repo_name in MODULE.bazel for load generation by
[@&#8203;fmeum](https://togithub.com/fmeum) in
[https://github.com/bazelbuild/bazel-gazelle/pull/1463](https://togithub.com/bazelbuild/bazel-gazelle/pull/1463)
- Add `.ijwb` to `.gitignore` by
[@&#8203;fmeum](https://togithub.com/fmeum) in
[https://github.com/bazelbuild/bazel-gazelle/pull/1478](https://togithub.com/bazelbuild/bazel-gazelle/pull/1478)
- Use spaces instead of tabs in go_repositor_tools_srcs.bzl by
[@&#8203;fmeum](https://togithub.com/fmeum) in
[https://github.com/bazelbuild/bazel-gazelle/pull/1479](https://togithub.com/bazelbuild/bazel-gazelle/pull/1479)
- Run buildifier by [@&#8203;fmeum](https://togithub.com/fmeum) in
[https://github.com/bazelbuild/bazel-gazelle/pull/1480](https://togithub.com/bazelbuild/bazel-gazelle/pull/1480)
- bzlmod: Test BCR test module on all platforms by
[@&#8203;fmeum](https://togithub.com/fmeum) in
[https://github.com/bazelbuild/bazel-gazelle/pull/1481](https://togithub.com/bazelbuild/bazel-gazelle/pull/1481)
- bzlmod: Allow overriding default Go module configuration by
[@&#8203;seh](https://togithub.com/seh) in
[https://github.com/bazelbuild/bazel-gazelle/pull/1456](https://togithub.com/bazelbuild/bazel-gazelle/pull/1456)
- fix(bzlmod): apply go.sum sums after version resolution by
[@&#8203;tyler-french](https://togithub.com/tyler-french) in
[https://github.com/bazelbuild/bazel-gazelle/pull/1477](https://togithub.com/bazelbuild/bazel-gazelle/pull/1477)
- fix(bzlmod/go_deps): don't read go.sum for empty go.mod files by
[@&#8203;tyler-french](https://togithub.com/tyler-french) in
[https://github.com/bazelbuild/bazel-gazelle/pull/1484](https://togithub.com/bazelbuild/bazel-gazelle/pull/1484)
- feat(bzlmod): support go.mod replace directives by
[@&#8203;tyler-french](https://togithub.com/tyler-french) in
[https://github.com/bazelbuild/bazel-gazelle/pull/1450](https://togithub.com/bazelbuild/bazel-gazelle/pull/1450)
- README update mentioning gazelle-haskell-modules by
[@&#8203;kczulko](https://togithub.com/kczulko) in
[https://github.com/bazelbuild/bazel-gazelle/pull/1439](https://togithub.com/bazelbuild/bazel-gazelle/pull/1439)
- Exclude `.ijwb` from repository tools srcs by
[@&#8203;fmeum](https://togithub.com/fmeum) in
[https://github.com/bazelbuild/bazel-gazelle/pull/1490](https://togithub.com/bazelbuild/bazel-gazelle/pull/1490)
- bzlmod: Fix interaction between replace and implicit upgrade check by
[@&#8203;fmeum](https://togithub.com/fmeum) in
[https://github.com/bazelbuild/bazel-gazelle/pull/1492](https://togithub.com/bazelbuild/bazel-gazelle/pull/1492)

#### New Contributors

- [@&#8203;darist](https://togithub.com/darist) made their first
contribution in
[https://github.com/bazelbuild/bazel-gazelle/pull/1410](https://togithub.com/bazelbuild/bazel-gazelle/pull/1410)
- [@&#8203;mbicz](https://togithub.com/mbicz) made their first
contribution in
[https://github.com/bazelbuild/bazel-gazelle/pull/1432](https://togithub.com/bazelbuild/bazel-gazelle/pull/1432)
- [@&#8203;cpsauer](https://togithub.com/cpsauer) made their first
contribution in
[https://github.com/bazelbuild/bazel-gazelle/pull/1384](https://togithub.com/bazelbuild/bazel-gazelle/pull/1384)
- [@&#8203;manuelnaranjo](https://togithub.com/manuelnaranjo) made their
first contribution in
[https://github.com/bazelbuild/bazel-gazelle/pull/1438](https://togithub.com/bazelbuild/bazel-gazelle/pull/1438)
- [@&#8203;moisesvega](https://togithub.com/moisesvega) made their first
contribution in
[https://github.com/bazelbuild/bazel-gazelle/pull/1454](https://togithub.com/bazelbuild/bazel-gazelle/pull/1454)
- [@&#8203;stevebarrau](https://togithub.com/stevebarrau) made their
first contribution in
[https://github.com/bazelbuild/bazel-gazelle/pull/1447](https://togithub.com/bazelbuild/bazel-gazelle/pull/1447)
- [@&#8203;seh](https://togithub.com/seh) made their first contribution
in
[https://github.com/bazelbuild/bazel-gazelle/pull/1456](https://togithub.com/bazelbuild/bazel-gazelle/pull/1456)
- [@&#8203;kczulko](https://togithub.com/kczulko) made their first
contribution in
[https://github.com/bazelbuild/bazel-gazelle/pull/1439](https://togithub.com/bazelbuild/bazel-gazelle/pull/1439)

**Full Changelog**:
bazel-contrib/bazel-gazelle@v0.29.0...v0.30.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.

🔕 **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 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/cgrindel/bazel-starlib).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNS4yMy4zIiwidXBkYXRlZEluVmVyIjoiMzUuMjMuMyJ9-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
renovate bot referenced this pull request in kreempuff/rules_unreal_engine Apr 14, 2023
[![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.29.0` -> `v0.30.0` |

---

### ⚠ Dependency Lookup Warnings ⚠

Warnings were logged while processing this repo. Please check the
Dependency Dashboard for more information.

---

### Release Notes

<details>
<summary>bazelbuild/bazel-gazelle</summary>

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

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

#### What's Changed

- fix: add missing Starlark dependency and introduce `bzl_test` by
[@&#8203;cgrindel](https://togithub.com/cgrindel) in
[https://github.com/bazelbuild/bazel-gazelle/pull/1413](https://togithub.com/bazelbuild/bazel-gazelle/pull/1413)
- Upgrade rules_go and known imports by
[@&#8203;linzhp](https://togithub.com/linzhp) in
[https://github.com/bazelbuild/bazel-gazelle/pull/1426](https://togithub.com/bazelbuild/bazel-gazelle/pull/1426)
- Regenerate known imports from downgraded go_googleapis by
[@&#8203;linzhp](https://togithub.com/linzhp) in
[https://github.com/bazelbuild/bazel-gazelle/pull/1429](https://togithub.com/bazelbuild/bazel-gazelle/pull/1429)
- testdata with buildable Go pkg deep below by
[@&#8203;linzhp](https://togithub.com/linzhp) in
[https://github.com/bazelbuild/bazel-gazelle/pull/1433](https://togithub.com/bazelbuild/bazel-gazelle/pull/1433)
- language/go: add //go:embed all:<pattern> support by
[@&#8203;mbicz](https://togithub.com/mbicz) in
[https://github.com/bazelbuild/bazel-gazelle/pull/1432](https://togithub.com/bazelbuild/bazel-gazelle/pull/1432)
- Fix `go mod download` output expectation for errors by
[@&#8203;illicitonion](https://togithub.com/illicitonion) in
[https://github.com/bazelbuild/bazel-gazelle/pull/1442](https://togithub.com/bazelbuild/bazel-gazelle/pull/1442)
- Apply map_kind to existing rules as well as new ones by
[@&#8203;illicitonion](https://togithub.com/illicitonion) in
[https://github.com/bazelbuild/bazel-gazelle/pull/1425](https://togithub.com/bazelbuild/bazel-gazelle/pull/1425)
- Ignore symlinks into Bazel output rather than relying on name by
[@&#8203;cpsauer](https://togithub.com/cpsauer) in
[https://github.com/bazelbuild/bazel-gazelle/pull/1384](https://togithub.com/bazelbuild/bazel-gazelle/pull/1384)
- Use `short_path` for `go` in the wrapper by
[@&#8203;fmeum](https://togithub.com/fmeum) in
[https://github.com/bazelbuild/bazel-gazelle/pull/1446](https://togithub.com/bazelbuild/bazel-gazelle/pull/1446)
- feature: gazelle wrapper allows to pass environment variables by
[@&#8203;manuelnaranjo](https://togithub.com/manuelnaranjo) in
[https://github.com/bazelbuild/bazel-gazelle/pull/1438](https://togithub.com/bazelbuild/bazel-gazelle/pull/1438)
- Update directive documentation by
[@&#8203;moisesvega](https://togithub.com/moisesvega) in
[https://github.com/bazelbuild/bazel-gazelle/pull/1454](https://togithub.com/bazelbuild/bazel-gazelle/pull/1454)
- Update gazelle directive documenmtation. by
[@&#8203;moisesvega](https://togithub.com/moisesvega) in
[https://github.com/bazelbuild/bazel-gazelle/pull/1455](https://togithub.com/bazelbuild/bazel-gazelle/pull/1455)
- Default Visibility extension overwrite on descent (fixes
[#&#8203;1467](https://togithub.com/bazelbuild/bazel-gazelle/issues/1467))
by [@&#8203;dnathe4th](https://togithub.com/dnathe4th) in
[https://github.com/bazelbuild/bazel-gazelle/pull/1472](https://togithub.com/bazelbuild/bazel-gazelle/pull/1472)
- Allow keep to be explained by
[@&#8203;stevebarrau](https://togithub.com/stevebarrau) in
[https://github.com/bazelbuild/bazel-gazelle/pull/1447](https://togithub.com/bazelbuild/bazel-gazelle/pull/1447)
- Respect repo_name in MODULE.bazel for load generation by
[@&#8203;fmeum](https://togithub.com/fmeum) in
[https://github.com/bazelbuild/bazel-gazelle/pull/1463](https://togithub.com/bazelbuild/bazel-gazelle/pull/1463)
- Add `.ijwb` to `.gitignore` by
[@&#8203;fmeum](https://togithub.com/fmeum) in
[https://github.com/bazelbuild/bazel-gazelle/pull/1478](https://togithub.com/bazelbuild/bazel-gazelle/pull/1478)
- Use spaces instead of tabs in go_repositor_tools_srcs.bzl by
[@&#8203;fmeum](https://togithub.com/fmeum) in
[https://github.com/bazelbuild/bazel-gazelle/pull/1479](https://togithub.com/bazelbuild/bazel-gazelle/pull/1479)
- Run buildifier by [@&#8203;fmeum](https://togithub.com/fmeum) in
[https://github.com/bazelbuild/bazel-gazelle/pull/1480](https://togithub.com/bazelbuild/bazel-gazelle/pull/1480)
- bzlmod: Test BCR test module on all platforms by
[@&#8203;fmeum](https://togithub.com/fmeum) in
[https://github.com/bazelbuild/bazel-gazelle/pull/1481](https://togithub.com/bazelbuild/bazel-gazelle/pull/1481)
- bzlmod: Allow overriding default Go module configuration by
[@&#8203;seh](https://togithub.com/seh) in
[https://github.com/bazelbuild/bazel-gazelle/pull/1456](https://togithub.com/bazelbuild/bazel-gazelle/pull/1456)
- fix(bzlmod): apply go.sum sums after version resolution by
[@&#8203;tyler-french](https://togithub.com/tyler-french) in
[https://github.com/bazelbuild/bazel-gazelle/pull/1477](https://togithub.com/bazelbuild/bazel-gazelle/pull/1477)
- fix(bzlmod/go_deps): don't read go.sum for empty go.mod files by
[@&#8203;tyler-french](https://togithub.com/tyler-french) in
[https://github.com/bazelbuild/bazel-gazelle/pull/1484](https://togithub.com/bazelbuild/bazel-gazelle/pull/1484)
- feat(bzlmod): support go.mod replace directives by
[@&#8203;tyler-french](https://togithub.com/tyler-french) in
[https://github.com/bazelbuild/bazel-gazelle/pull/1450](https://togithub.com/bazelbuild/bazel-gazelle/pull/1450)
- README update mentioning gazelle-haskell-modules by
[@&#8203;kczulko](https://togithub.com/kczulko) in
[https://github.com/bazelbuild/bazel-gazelle/pull/1439](https://togithub.com/bazelbuild/bazel-gazelle/pull/1439)
- Exclude `.ijwb` from repository tools srcs by
[@&#8203;fmeum](https://togithub.com/fmeum) in
[https://github.com/bazelbuild/bazel-gazelle/pull/1490](https://togithub.com/bazelbuild/bazel-gazelle/pull/1490)
- bzlmod: Fix interaction between replace and implicit upgrade check by
[@&#8203;fmeum](https://togithub.com/fmeum) in
[https://github.com/bazelbuild/bazel-gazelle/pull/1492](https://togithub.com/bazelbuild/bazel-gazelle/pull/1492)

#### New Contributors

- [@&#8203;darist](https://togithub.com/darist) made their first
contribution in
[https://github.com/bazelbuild/bazel-gazelle/pull/1410](https://togithub.com/bazelbuild/bazel-gazelle/pull/1410)
- [@&#8203;mbicz](https://togithub.com/mbicz) made their first
contribution in
[https://github.com/bazelbuild/bazel-gazelle/pull/1432](https://togithub.com/bazelbuild/bazel-gazelle/pull/1432)
- [@&#8203;cpsauer](https://togithub.com/cpsauer) made their first
contribution in
[https://github.com/bazelbuild/bazel-gazelle/pull/1384](https://togithub.com/bazelbuild/bazel-gazelle/pull/1384)
- [@&#8203;manuelnaranjo](https://togithub.com/manuelnaranjo) made their
first contribution in
[https://github.com/bazelbuild/bazel-gazelle/pull/1438](https://togithub.com/bazelbuild/bazel-gazelle/pull/1438)
- [@&#8203;moisesvega](https://togithub.com/moisesvega) made their first
contribution in
[https://github.com/bazelbuild/bazel-gazelle/pull/1454](https://togithub.com/bazelbuild/bazel-gazelle/pull/1454)
- [@&#8203;stevebarrau](https://togithub.com/stevebarrau) made their
first contribution in
[https://github.com/bazelbuild/bazel-gazelle/pull/1447](https://togithub.com/bazelbuild/bazel-gazelle/pull/1447)
- [@&#8203;seh](https://togithub.com/seh) made their first contribution
in
[https://github.com/bazelbuild/bazel-gazelle/pull/1456](https://togithub.com/bazelbuild/bazel-gazelle/pull/1456)
- [@&#8203;kczulko](https://togithub.com/kczulko) made their first
contribution in
[https://github.com/bazelbuild/bazel-gazelle/pull/1439](https://togithub.com/bazelbuild/bazel-gazelle/pull/1439)

**Full Changelog**:
bazel-contrib/bazel-gazelle@v0.29.0...v0.30.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 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/kreempuff/rules_unreal_engine).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNS4yMy4zIiwidXBkYXRlZEluVmVyIjoiMzUuNDAuMCJ9-->
@felberj
Copy link

felberj commented Jul 5, 2023

I just found this because I was wondering why "external" is not followed anymore. I am happy that I no longer need to exclude all the directories, but I would still like to follow some symlinks. It seems like the follow directive is broken right now?

I propose we follow a symlink if it is as part of the follow directive, WDYT?

@felberj
Copy link

felberj commented Jul 5, 2023

Example: If I put

# gazelle:follow external

I expect gazelle to look into the external directory. This becomes useful with #1573 where we can actually resolve targets in external repositories.

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.

Respect --symlink_prefix bazel setting
5 participants