-
Notifications
You must be signed in to change notification settings - Fork 29.6k
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
tools,gyp: don't force build actions with multiple outputs #23982
Conversation
Don't add `force_append` (FORCE_DO_CMD) to the intermediate sentinal. Adding it makes the action run alway, even when there are no changes. Excluding macOS which has a different way of resolving dependancies which can lead to deadlocks. (refack): AFAICT because `*.intermediate` files don't have build rules.
/CC @nodejs/python @nodejs/build-files @nodejs/gyp |
if self.flavor == 'mac': | ||
self.WriteLn('%s: %s%s' % (intermediate, ' '.join(inputs), force_append)) | ||
else: | ||
self.WriteLn('%s: %s' % (intermediate, ' '.join(inputs))) |
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.
This is the wrong way of doing it. You're effectively ignoring the value of the force
argument to WriteMakeRule()
here.
The call comes from WriteDoCmd()
. Forcing the action to run when it's a command is correct; commands are imperatives. You should try to come up with another way of solving 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.
Yeah, I know this is a hack. But the soup GYP generates for make
is hard to reason about, and empirically this works (it also works on macOS, but might lead to deadlocks when run -jN
with N > 1). Works as in rebuilds iff action's file inputs are touched.
I'll give it more thought...
|
@sam-github yes. I work with this patch applied:
|
Excluding macOS which has a different way of resolving dependencies which can lead to deadlocks.
Reroll: #23156
Refs: #23257
Fixes: #23255
Don't add
force_append
(FORCE_DO_CMD) to the intermediate sentinel.Adding it makes the action run alway, even when there are no changes.
(refack): AFAICT because
*.intermediate
files don't have build rules.Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passes