-
Notifications
You must be signed in to change notification settings - Fork 28.7k
Invalidate build target when new output file is added #170253
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
Invalidate build target when new output file is added #170253
Conversation
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.
LGTM with one question.
@@ -152,7 +152,7 @@ abstract class Target { | |||
/// | |||
/// Returning `true` will cause [build] to be skipped. This is equivalent | |||
/// to a build that produces no outputs. | |||
bool canSkip(Environment environment) => false; | |||
Future<bool> canSkip(Environment environment) async => false; |
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.
Why does this need to be made async?
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 have a big PR coming and I'm trying to break it out into smaller bits. Eventually I want to add this, which requires it to be async:
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.
SGTM
Build targets are re-run when invalidated. This PR changes it so when a new output file is added to the expected output files, the build target will be invalidated and re-run.
This PR also changes
canSkip
to an async call.These changes are needed for #166486.
Pre-launch Checklist
///
).If you need help, consider asking for advice on the #hackers-new channel on Discord.