You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
0.45.1 (I have also re-tested against 0.46.0, the error persists)
What version of Bazel are you using?
7.0.2
What operating system and processor architecture are you using?
MacOS Apple Silicon
What did you do?
Gazelle appears not to recognise math/rand/v2 is part of stdlib.
I have other code in my repo that uses other parts of go stdlib and I have no issues, its only this new code I've added that uses math/rand/v2 that causes issues (/math/rand/v2 was introduced in go 1.22: https://tip.golang.org/doc/go1.22)
gazelle: finding module path for import math/rand/v2: go: malformed module path "math/rand/v2": missing dot in first path element
ERROR: /Users/<REDACTED>/inet/web/BUILD.bazel:19:8: GoCompilePkg internal/inet/web/web_test.internal.a failed: (Exit 1): builder failed: error executing GoCompilePkg command (from target //internal/inet/web:web_test) bazel-out/darwin_arm64-opt-exec-ST-13d3ddad9198/bin/external/rules_go~0.45.1~go_sdk~go_default_sdk/builder_reset/builder compilepkg -sdk external/rules_go~0.45.1~go_sdk~go_default_sdk -installsuffix ... (remaining 39 arguments skipped)
compilepkg: missing strict dependencies:
/private/var/tmp/_bazel_<REDACTED>/6a5a385c9542352444b50f29eada50c6/sandbox/darwin-sandbox/221/execroot/_main/internal/inet/web/retryclient.go: import of "math/rand/v2"
No dependencies were provided.
Check that imports in Go sources match importpath attributes in deps.
The text was updated successfully, but these errors were encountered:
For anyone who finds this at a later date, the problem was becasue default go_sdk download is 1.21.1, so I had to explicitly name the current version in MODULE.bazel, i.e. go_sdk.download(version = "1.22.0")
Clearly the error message provided by gazelle is incredibly unhelpful, verging on useless though !
What version of gazelle are you using?
0.35.0
What version of rules_go are you using?
0.45.1 (I have also re-tested against 0.46.0, the error persists)
What version of Bazel are you using?
7.0.2
What operating system and processor architecture are you using?
MacOS Apple Silicon
What did you do?
Gazelle appears not to recognise
math/rand/v2
is part of stdlib.I have other code in my repo that uses other parts of go stdlib and I have no issues, its only this new code I've added that uses
math/rand/v2
that causes issues (/math/rand/v2
was introduced in go 1.22: https://tip.golang.org/doc/go1.22)The text was updated successfully, but these errors were encountered: