-
Notifications
You must be signed in to change notification settings - Fork 554
improvement(fluid-build): Add LeafWithGlobInputOutputDoneFileTask and use it in DeclarativeTaskHandler #23198
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
Conversation
… use it in DeclarativeTaskHandler
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 :)
@@ -567,6 +574,12 @@ export class UnknownLeafTask extends LeafTask { | |||
} | |||
} | |||
|
|||
/** | |||
* A Leaf task base that can be used for tasks that have a list of input and output file paths to include in the | |||
* donefile. By default, the donefile will contain the filestat information, like last modified time, as the values in |
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.
optional nit: I prefer this wording personally
* donefile. By default, the donefile will contain the filestat information, like last modified time, as the values in | |
* donefile. By default, the donefile will contain the filestat information (i.e. last modified time) as the values in |
@@ -188,6 +188,7 @@ export class TaskFactory { | |||
const executable = getExecutableFromCommand( | |||
command, | |||
context.fluidBuildConfig?.multiCommandExecutables ?? [], | |||
// TODO: Is the toLowerCase necessary here? Commands are usually case-sensitive |
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.
Not necessarily in this PR, but I agree that we can remove toLowerCase()
Declarative tasks use input/output globs to determine their input and output files. This change pulls that functionality into an abstract base class so that other non-declarative tasks can share the logic. The DeclarativeTask class was refactored to inherit from the shared base class.
I originally made this change to create a new task handler, but ultimately I was able to do it with just a declarative task. Still, I think this change is worthwhile and makes the general "use globs for input/output paths" functionality more widely available.