Closed Illedran closed 2 months ago
I think that we can fix this if we decide to drop compatibility with Bazel 5, see https://github.com/bazelbuild/rules_go/blob/d45e218910fbecb00867e3a4dde3fe14d4a1e00a/go/private/BUILD.bazel#L179-L180
@tyler-french @linzhp What do you think, are we ready for this?
We ran into this issue when upgrading to rules_go 0.29 in Nov 2021, before Bazel 6 was available. The solution was to create an aspect instead.
I am afraid it's still too early to drop compatibility with Bazel 6, when Bazel 7 was only 3 month old.
@linzhp Sorry I meant dropping support for Bazel 5, i.e., exclusively supporting Bazel 6 and higher (edited my comment above)
That sounds more reasonable. I am fine with dropping Bazel 5 support.
@linzhp @fmeum Hello! Running into the same issue here. Is there a known work-around for that? Right now, it, unfortunately, blocks adoption of the nogo rules in my project
I looked into this a bit more and it turns out to be a known Bazel issue (https://github.com/bazelbuild/bazel/issues/14169). I have pinged it and will try to work on a fix.
The recommended workarounds include using an aspect instead or running bazel query
outside of Bazel. As this is not something we can work around on the rules_go side, I will close the rules_go issue.
What version of rules_go are you using?
v0.46.0
What version of gazelle are you using?
No gazelle.
What version of Bazel are you using?
7.0.2
Does this issue reproduce with the latest releases of all the above?
Yes (
v0.46.0
and7.0.2
are latest as of time of writing).What operating system and processor architecture are you using?
Any other potentially useful information about your toolchain?
No bzlmod.
What did you do?
When having
nogo
enabled, attempting to build agenquery
whose expression referencesgo_*
rules fails due to a cycle in dependency graph.WORKSPACE
src/main.go
src/BUILD.bazel
Same example as above is also available at https://github.com/Illedran/nogo_genquery_bug.