We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Describe the bug If you try to build a go using rules_nixpkgs and rules_go 0.42.0, the rules_go builder will panic with:
rulesGoStdlibPrefix should have been set via -X
To Reproduce Build any go package with rules_nixpkgs and rules_go 0.42.0
Expected behavior Not panic
Additional context
diff --git a/toolchains/go/go.bzl b/toolchains/go/go.bzl index cb0f26a..179cd9c 100644 --- a/toolchains/go/go.bzl +++ b/toolchains/go/go.bzl @@ -212,6 +212,7 @@ go_sdk_build = """ load("@{rules_go}//go/private/rules:binary.bzl", "go_tool_binary") load("@{rules_go}//go/private/rules:sdk.bzl", "package_list") load("@{rules_go}//go:def.bzl", "go_sdk") +load("@{rules_go}//go/private:common.bzl", "RULES_GO_STDLIB_PREFIX") load("@{helpers}//:go_sdk.bzl", "go_sdk_for_arch") load(":go_version.bzl", "go_version") @@ -237,6 +238,7 @@ filegroup( go_tool_binary( name = "builder", srcs = ["@{rules_go}//go/tools/builders:builder_srcs"], + ldflags = "-X main.rulesGoStdlibPrefix=%s"% RULES_GO_STDLIB_PREFIX, sdk = ":go_sdk", ) -- 2.39.2
Fixes the issue.
bazel-contrib/rules_go@c2406b2 makes the change.
The reason this is an issue and not a PR because I'm not sure the best way to handle this change across different rules_go versions.
The text was updated successfully, but these errors were encountered:
There is this PR but I'm also very much uncertain how to handle this breaking change #422
Also this is the same issue as #421
Sorry, something went wrong.
We can dupe this then.
No branches or pull requests
Describe the bug
If you try to build a go using rules_nixpkgs and rules_go 0.42.0, the rules_go builder will panic with:
To Reproduce
Build any go package with rules_nixpkgs and rules_go 0.42.0
Expected behavior
Not panic
Additional context
Fixes the issue.
bazel-contrib/rules_go@c2406b2 makes the change.
The reason this is an issue and not a PR because I'm not sure the best way to handle this change across different rules_go versions.
The text was updated successfully, but these errors were encountered: