Closed fishy closed 2 months ago
Nevermind I read the doc wrong. I read https://github.com/bazelbuild/rules_go/blob/5ec14eeda14c221a03b314ba9ac315a4ef909fc0/docs/go/core/bzlmod.md#go-sdks as I need to call go_sdk.host()
after called go_sdk.download()
, but it's just one of the alternatives in parallel with the 2 different ways to call go_sdk.download()
.
What version of rules_go are you using?
0.48.1
What version of gazelle are you using?
0.38.0
What version of Bazel are you using?
7.2.1
Does this issue reproduce with the latest releases of all the above?
Those are latest releases
What operating system and processor architecture are you using?
linux/amd64
Any other potentially useful information about your toolchain?
What did you do?
We used to have
rules_go
inWORKSPACE
with this code to define go sdk:This works fine with environment without go toolchain installed locally (for example, CI environment with bazel base image), which is expected as we instructed it to download go sdk at the specific version.
But when I try to move it into bzlmod, with:
It works when there's go installed locally, but fails when there's not (in CI), with this error:
It seems that it wrongly referenced
go_host_sdk
which doesn't work without go toolchain installed locally.What did you expect to see?
What did you see instead?