-
-
Notifications
You must be signed in to change notification settings - Fork 662
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
Circular dependency between newer golang.org/x/tools and rules_go #2910
Comments
Using some bisection, I established that |
still reproduced in rules_go 0.28.0 |
I reproduced the same problem, and that it happens between This is what the dependencies used to look like with
|
Are you using Gazelle? I think the dependency problem might have been fixed in bazel-contrib/bazel-gazelle#1074. The fix is not in a release yet, but I was able to work around the problem by using this in my WORKSPACE:
|
I, personally, do not always use gazelle. Sometimes I find it more convenient to write the BUILD file manually and add the necessary go_repository rules. There are few popular packages around go ecosystem that require manual tweaking of go_repository flags to build. It will be handy if somebody could advice on a good option to pass to x/tools go_repository rule to make it build. |
Right, if you're using Alternatively, I suppose you could work around the problem by keeping
|
That's what my bug report says. :-) |
Now that we merged #2922 , the cycle due to nogo should be resolved. Can you try using rules_go at HEAD and see if that fixes your problem? Thanks |
The below works, but somebody should make a proper Gazelle release.
|
I'm guessing this still doesn't work? I had to switch to an older |
I believe it works with the latest release of Gazelle/rules_go. Please let me know if not. Here's the latest WORKSPACE boilerplate. https://github.com/bazelbuild/bazel-gazelle/#running-gazelle-with-bazel |
Thanks @robfig - confirmed that this is fixed with latest |
Thanks for confirming. Closing |
I was happily building my project with bazel for months until suddenly this happened:
The build was in good health until I needed to upgrade some packages (presumably pulling a newer version of
golang.org/x/tools
).Building with plain
go build
works just fine, as before.The text was updated successfully, but these errors were encountered: