-
-
Notifications
You must be signed in to change notification settings - Fork 678
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
switching from bazel test to coverage causes GoStdlib to be rebuilt with go1.20 #3472
Comments
Go 1.20 stopped shipping the standard library in precompiled form and current version of Bazel aren't good at preventing rebuilds. The situation should improve with bazelbuild/bazel#16910, so if you can, please try |
Bringing in the info from the Slack thread, seems to be a separate issue from bazelbuild/bazel#16910. When diffing the 2 configs, we don't see anything standing out:
I was able to reproduce with the following setup:
And then switch back and forth between @fmeum did find that we were leaking the coverage C flags leak into the stdlib build:
vs.
I attempted to patch this (which I might be totally wrong about how I did it) to see if I could get the flags for
|
I will submit a PR that drops the coverage flags from the stdlib action (they are useless), but that doesn't prevent the rebuild. I think that this hits a limitation of |
#3521 and #3522 do everything we can from the Go side. I submitted bazelbuild/bazel#18002 to improve the way Bazel computes the diff-based output directory suffix. |
This may be related to #2693 |
This should be fixed with Bazel 6.4.0 and later with |
What version of rules_go are you using?
v0.38.1 with go1.20
What version of gazelle are you using?
v0.29.0
What version of Bazel are you using?
5.4.0
Does this issue reproduce with the latest releases of all the above?
Yes
What operating system and processor architecture are you using?
macOS 13.2, M1 Max (but reproduces on our Linux systems as well)
Any other potentially useful information about your toolchain?
Related thread in Bazel Slack: https://bazelbuild.slack.com/archives/CDBP88Z0D/p1677506103789169
Potentially related issue: golang/go#58848
What did you do?
Ran
bazel test //foo/bar:bar_test --nocache_test_results
, see actions like this show upRan
bazel coverage //foo/bar:bar_test --nocache_test_results
, see actions like this show up again:What did you expect to see?
The
GoStdlib
actions to not be run againWhat did you see instead?
The
GoStdlib
actions ran againThe text was updated successfully, but these errors were encountered: