-
-
Notifications
You must be signed in to change notification settings - Fork 668
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
Cannot use 'rules_go' + 'com_google_protobuf' to compile gogo/status #2805
Comments
I was able to reproduce this, but I'm not sure exactly what's going wrong. It seems like a version mismatch. Things to try:
|
I updated all the dependencies, the only change is that Here is a branch of my test repository with those dependencies updated via:
|
Adding
replaces the above error with:
which appears to be the issue reported in #2758 (comment) |
😢 I think I'm pretty stuck here. I'm not even using protobuf, but my codebase depends on a third-party go library that uses it internally. Are there any other workarounds to try @jayconrod ? |
I tried this sequence, and
That produced this
|
The error Still, if you can post a commit and a |
Alright, I am able to replicate your steps and confirm that: Then I was running into the following issue:
This turned out to be because I used At this point I was able to run 🎉, so I tried to figure out where I went wrong before. I think the issue was that I was confused by the above error message and removed the
I will try to backport this fix into my actual repository with much more going on and see if it still holds. Hopefully this post will at least show up on google for other people trying to figure out what to do when they see these error messages. |
Ok, this worked for me! To summarize the necessary steps:
I sure did not know all of those things when I first made this ticket 😅 Thanks for all the help @jayconrod ! |
If someone finds this in the future... I spent 2 days figuring this out too, as I was attempting to migrate a large repository to Bazel. The key to this was |
What version of rules_go are you using?
v0.25.1
What version of gazelle are you using?
v0.22.3
What version of Bazel are you using?
v4.0.0
Does this issue reproduce with the latest releases of all the above?
I think these are all the latest possible.
What operating system and processor architecture are you using?
Ubuntu 18.04, Linux, x86_64
Any other potentially useful information about your toolchain?
What did you do?
I am trying to compile a minimal go binary that uses
gogo/status
as the only dependency. However, every combination ofbuild_file_proto_mode = "disable|disable_global"
andcom_google_protobuf
version seems to have compilation errors related to proto version mismatches.A minimal example can be found in this repo:
https://github.com/psigen/rules-go-2805
Related information I have been using for reference:
What did you expect to see?
I expect
bazel build //...
to complete without error.What did you see instead?
The text was updated successfully, but these errors were encountered: