-
-
Notifications
You must be signed in to change notification settings - Fork 664
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
Non-go deps built twice with gotags #3430
Comments
cc @fmeum @illicitonion I hope this bug report helps. I would be happy to fix it myself but I lack understanding of how transitions work in rules_go |
I don't think this is a regression. With v0.33.0, which doesn't contain b0b7d85, running The fix is to use a recent version of rules_go, Bazel 6, and the flag |
Thanks a lot 🙏 So is this a problem with Bazel, not rules_go? |
Well, let's call it a missing optimization. But yes, short of ditching transitions entirely or using quite complex and fragile tricks, there is nothing rules_go can do about this by itself. |
Will be fixed by default in Bazel 7 and can be fixed by setting |
What version of rules_go are you using?
v0.38.0
What version of Bazel are you using?
6.0.0
Does this issue reproduce with the latest releases of all the above?
Yes
What operating system and processor architecture are you using?
amd64 RHEL 8
Any other potentially useful information about your toolchain?
GCC 8.5.0
What did you do?
Run https://github.com/terorie/rules_go_bug
What did you expect to see?
Dep tree as follows
go_test -> go_library -> cc_library
.The
go_test
has one string ingotags
set.When I
bazel build
thego_test
andgo_library
, I expectcc_library
to be only built once.What did you see instead?
cc_library
is built twice.Related
The text was updated successfully, but these errors were encountered: