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

nogo skips analyzers when using go1.24: (unsupported version: 2); please report an issue #4267

Closed
prestonvanloon opened this issue Feb 13, 2025 · 2 comments · Fixed by #4272

Comments

@prestonvanloon
Copy link
Contributor

Reproduction steps:

  1. Set go version to 1.24.0 here

go_register_toolchains(version = "1.23.1")

  1. bazel build //...

This is the error I observed:

ERROR: /tmp/rules_go/tests/legacy/cgo_filtered/BUILD.bazel:3:8: Running nogo on //tests/legacy/cgo_filtered:go_default_test failed: (Exit 1): builder failed: error executing RunNogo command (from target //tests/legacy/cgo_filtered:go_default_test) bazel-out/k8-opt-exec-ST-a828a81199fe/bin/external/go_sdk/builder_reset/builder nogo -sdk external/go_sdk -goroot bazel-out/k8-fastbuild/bin/stdlib_ -installsuffix linux_amd64 -src ... (remaining 19 arguments skipped)

Use --sandbox_debug to see verbose messages from the sandbox and retain the sandbox build root for debugging
nogo: nogo: error running analyzers: 26 analyzers skipped due to type-checking error: tests/legacy/cgo_filtered/pure_test.go:3:8: could not import testing (internal error in importing "testing" (unsupported version: 2); please report an issue)
ERROR: /tmp/rules_go/tests/legacy/cgo_filtered/BUILD.bazel:3:8 Validating nogo output for //tests/legacy/cgo_filtered:go_default_test failed: (Exit 1): builder failed: error executing RunNogo command (from target //tests/legacy/cgo_filtered:go_default_test) bazel-out/k8-opt-exec-ST-a828a81199fe/bin/external/go_sdk/builder_reset/builder nogo -sdk external/go_sdk -goroot bazel-out/k8-fastbuild/bin/stdlib_ -installsuffix linux_amd64 -src ... (remaining 19 arguments skipped)

Use --sandbox_debug to see verbose messages from the sandbox and retain the sandbox build root for debugging
INFO: Elapsed time: 67.405s, Critical Path: 58.71s
INFO: 2083 processes: 276 internal, 94 local, 1713 processwrapper-sandbox.
ERROR: Build did NOT complete successfully

This issue is valid at commit 54ba841 which is from an hour ago at the time of filing.

@sluongng
Copy link
Contributor

Upgrading x/tools to the latest version solved this for me.

@prestonvanloon
Copy link
Contributor Author

@sluongng I'm already on golang.org/x/[email protected] and so is rules_go at the commit I referenced.

If you check out rules_go at the latest commit and make the change I mentioned above to set go to go1.24, are you seeing the same issue?

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 a pull request may close this issue.

2 participants