-
-
Notifications
You must be signed in to change notification settings - Fork 666
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
Build failures when using a local go 1.21.0 SDK #3665
Comments
@sluongng submitted a fix in bazel-contrib/bazel-gazelle@adce430, which hasn't been released yet. @adam-azarchs Based on your investigation, it looks like adding |
I think we don't need to revert bazel-contrib/bazel-gazelle@adce430 BEFORE adding Instead, I think we should add |
Sounds good! |
Go 1.21 added a requirement for a 'go.env' file. Without that file, Go will throw an error like: ``` Error in fail: failed to fetch org_golang_google_grpc_cmd_protoc_gen_go_grpc: fetch_repo: google.golang.org/grpc/cmd/[email protected]: GOPROXY list is not the empty string, but contains no entries ``` This commit adds it to the SDK exposed by rules_nixpkgs so that it is compatible with rules_go. See: - bazel-contrib/rules_go#3665 - bazel-contrib/rules_go#3666
Go 1.21 added a requirement for a 'go.env' file. Without that file, Go will throw an error like: ``` Error in fail: failed to fetch org_golang_google_grpc_cmd_protoc_gen_go_grpc: fetch_repo: google.golang.org/grpc/cmd/[email protected]: GOPROXY list is not the empty string, but contains no entries ``` This commit adds it to the SDK exposed by rules_nixpkgs so that it is compatible with rules_go. See: - bazel-contrib/rules_go#3665 - bazel-contrib/rules_go#3666
What version of rules_go are you using?
v0.41.0
What version of gazelle are you using?
v0.32.0
What version of Bazel are you using?
6.3.2
Does this issue reproduce with the latest releases of all the above?
Yes
What operating system and processor architecture are you using?
Linux/amd64
Any other potentially useful information about your toolchain?
Using
go_host_sdk
, with go 1.21.0.What did you do?
Attempt to build with external repository dependencies (not bzlmod, though I doubt that matters here)
What did you expect to see?
Working build.
What did you see instead?
Building with
go build
works fine.A little bit of Googling around turned up golang/go#61928. I suspect the issue is that
https://github.com/bazelbuild/rules_go/blob/139ec3c5ebf86682527aa1decc09b01d17235b97/go/private/BUILD.sdk.bazel#L77-L84
is not pulling in the new
go.env
file from the root of the SDK directory.Honestly I'm not sure whether I'd count this as a bug in
rules_go
(for not including the file) orgo
itself (for failing this way if the file is missing, rather than just falling back on sensible defaults like it would if the file was present but empty).The text was updated successfully, but these errors were encountered: