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

Switching branches results in no such file or directory (missing Go SDK) #4278

Open
arjantop-cai opened this issue Feb 17, 2025 · 0 comments

Comments

@arjantop-cai
Copy link

I have two branches, one with rules_go 0.52.0 + go 1.23 and another with rules_go 0.53.0 + go 1.24

I get a strange error sometimes when switching between the two branches:

Error in fail: gazelle++go_deps+org_golang_google_genproto_googleapis_rpc: fetch_repo:
go mod download exec error: /private/var/tmp/_bazel_atopolovec/29ec91ab44902ce087f81950e63441b1/external/rules_go++go_sdk+go_sdk/bin/go /private/var/tmp/_bazel_atopolovec/29ec91ab44902ce087f81950e63441b1/external/rules_go++go_sdk+go_sdk/bin/go mod download -json -modcacherw google.golang.org/genproto/googleapis/[email protected]: fork/exec /private/var/tmp/_bazel_atopolovec/29ec91ab44902ce087f81950e63441b1/external/rules_go++go_sdk+go_sdk/bin/go: no such file or directory

I have not been able to reproduce what is the trigger or steps to reproduce.

fmeum added a commit to bazel-contrib/bazel-gazelle that referenced this issue Feb 17, 2025
**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?**

Bazel 8 no longer watches `Label`s passed to `repository_ctx.path` by
default, which can result in `go_repository`s not being refetched when
the Go env or Gazelle changes.


**Which issues(s) does this PR fix?**

Related to bazel-contrib/rules_go#4278

**Other notes for review**
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

No branches or pull requests

1 participant