-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
build: adding missing bin/.bootstrap order-only dependency #38857
Conversation
Any rule which uses `gofmt` or `goimports` needs to have an order-only dependency on `bin/.bootstrap`, otherwise the `bin/.bootstrap` rule can run in parallel causing a race between `bin/gofmt` getting created and it being used by the rule. This would result in rare "text file busy" errors when running a partially written `bin/gofmt`. Release note: None
Cc @andreimatei, @tbg |
@bobvawter Do you know make well enough to review this? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll pretend that I know more about make than I ought to :-) . I assume that you've grepped for all rules that invoke gofmt
and tweaked them?
Reviewed 1 of 1 files at r1.
Reviewable status: complete! 1 of 0 LGTMs obtained
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I assume that you've grepped for all rules that invoke gofmt and tweaked them?
Yep. And goimports
as well.
Reviewable status: complete! 1 of 0 LGTMs obtained
TFTR! Unrelated roachtest failure. bors r=bobvawter |
38857: build: adding missing bin/.bootstrap order-only dependency r=bobvawter a=petermattis Any rule which uses `gofmt` or `goimports` needs to have an order-only dependency on `bin/.bootstrap`, otherwise the `bin/.bootstrap` rule can run in parallel causing a race between `bin/gofmt` getting created and it being used by the rule. This would result in rare "text file busy" errors when running a partially written `bin/gofmt`. Release note: None Co-authored-by: Peter Mattis <[email protected]>
Build succeeded |
Any rule which uses
gofmt
orgoimports
needs to have an order-onlydependency on
bin/.bootstrap
, otherwise thebin/.bootstrap
rule canrun in parallel causing a race between
bin/gofmt
getting created andit being used by the rule. This would result in rare "text file busy"
errors when running a partially written
bin/gofmt
.Release note: None