rules_go via 0.41.0 through bazel-gazelle 0.32.0, but any later version also fails.
What version of gazelle are you using?
0.32.0
What version of Bazel are you using?
7.1.1
Does this issue reproduce with the latest releases of all the above?
Yes.
What operating system and processor architecture are you using?
Gentoo Linux amd64
Any other potentially useful information about your toolchain?
$ gcc --version
gcc (Gentoo Hardened 13.2.1_p20240210 p14) 13.2.1 20240210
Copyright (C) 2023 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
$ ld.lld --version
LLD 17.0.6 (compatible with GNU linkers)
What did you do?
I am working on a ruleset that depends on Gazelle for Starlark library management. I used bazel-contrib/rules-template as a basis for my ruleset, which included bazel-gazelle 0.35.0. Running this tool on my computer always fails with the error I listed below. I've narrowed down the issue to rules_go commit 58534a2cda8e546a4dec6ea9c6b64eb0bfe824dd, which updates the Go version from 1.19.8 to 1.20.2. Reverting this change with a local_path_override will make the build work properly.
Here's the minimal set of files that cause the error on my system:
# MODULE.bazel
bazel_dep(name = "gazelle", version = "0.36.0", dev_dependency = True, repo_name = "bazel_gazelle")
bazel_dep(name = "bazel_skylib_gazelle_plugin", version = "1.4.1", dev_dependency = True)
# BUILD.bazel
load("@bazel_gazelle//:def.bzl", "gazelle", "gazelle_binary")
gazelle_binary(
name = "gazelle_bin",
languages = ["@bazel_skylib_gazelle_plugin//bzl"],
)
gazelle(
name = "gazelle",
gazelle = "gazelle_bin",
)
What version of rules_go are you using?
rules_go
via 0.41.0 throughbazel-gazelle
0.32.0, but any later version also fails.What version of gazelle are you using?
0.32.0
What version of Bazel are you using?
7.1.1
Does this issue reproduce with the latest releases of all the above?
Yes.
What operating system and processor architecture are you using?
Gentoo Linux amd64
Any other potentially useful information about your toolchain?
What did you do?
I am working on a ruleset that depends on Gazelle for Starlark library management. I used
bazel-contrib/rules-template
as a basis for my ruleset, which includedbazel-gazelle
0.35.0. Running this tool on my computer always fails with the error I listed below. I've narrowed down the issue torules_go
commit 58534a2cda8e546a4dec6ea9c6b64eb0bfe824dd, which updates the Go version from 1.19.8 to 1.20.2. Reverting this change with alocal_path_override
will make the build work properly.Here's the minimal set of files that cause the error on my system:
What did you expect to see?
Gazelle running normally.
What did you see instead?