Skip to content

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

Merged
merged 8 commits into from
Jun 18, 2025

Conversation

tylerbutler
Copy link
Member

@tylerbutler tylerbutler commented Nov 24, 2024

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.

@github-actions github-actions bot added area: build Build related issues base: main PRs targeted against main branch labels Nov 24, 2024
@tylerbutler tylerbutler changed the title improvement(build-tools): Add LeafWithGlobInputOutputDoneFileTask and use it in DeclarativeTaskHandler improvement(fluid-build): Add LeafWithGlobInputOutputDoneFileTask and use it in DeclarativeTaskHandler Nov 24, 2024
@tylerbutler tylerbutler marked this pull request as ready for review November 24, 2024 00:22
@tylerbutler tylerbutler requested a review from a team November 24, 2024 00:24
@jason-ha jason-ha requested a review from zhenmichael December 12, 2024 20:22
@tylerbutler tylerbutler requested review from scottn12 and removed request for zhenmichael May 22, 2025 21:46
Copy link
Contributor

@scottn12 scottn12 left a 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
Copy link
Contributor

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

Suggested change
* 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
Copy link
Contributor

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()

@tylerbutler tylerbutler enabled auto-merge (squash) June 18, 2025 23:37
@tylerbutler tylerbutler merged commit 2458f52 into microsoft:main Jun 18, 2025
26 checks passed
@tylerbutler tylerbutler deleted the bt-task-fixes branch June 18, 2025 23:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: build Build related issues base: main PRs targeted against main branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants