-
Notifications
You must be signed in to change notification settings - Fork 536
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
improvement(fluid-build): Fix group task dependencies and reduce message clutter #23523
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.
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
@tylerbutler FYI. |
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 minus docs requests, maybe Michael/TylerB have other thoughts.
I was going to cut a flub release to adopt some of Tyler's changes--I'll wait for this to go in before doing so.
@Abe27342 There's a build-tools prerelease that has the changes to unblock r11s upgrade, if you're blocked. |
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.
Additionally, make
getFluidBuildConfig
correctly track whichsearchDir
is using a default config in case it is used with multiplesearchDir
in the future.
No objection to this change, but I am curious if you have a specific scenario in mind that needs this?
@@ -33,7 +33,7 @@ export class GroupTask extends Task { | |||
if (prevTask !== undefined) { | |||
const leafTasks = new Set<LeafTask>(); | |||
prevTask.collectLeafTasks(leafTasks); | |||
task.addDependentLeafTasks(leafTasks.values()); | |||
task.addDependentLeafTasks(leafTasks); |
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.
Is there something we could do to the function typing to prevent this sort of mistake? Maybe it's one of those things where both could be correct, and this was just a case where the wrong value was used?
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 was surprised that worked before. but from the typescript iterable definition, the SetIterator has @@iterator field, which makes it an iterable :( Not sure what else to do here.
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.
Having a hard time figuring out what the error is though. Passing a Set, or Never mind, missed the reason in the PR description.<Set>.values()
seems like it should be the same thing in this case (where an Iterable is expected)?
/azp run Build - protocol-definitions,Build - test-tools,server-gitrest,server-gitssh,server-historian,server-routerlicious,Build - client packages,repo-policy-check |
/azp run Build - api-markdown-documenter,Build - benchmark-tool,Build - build-common,Build - build-tools,Build - common-utils,Build - eslint-config-fluid,Build - eslint-plugin-fluid |
Azure Pipelines successfully started running 1 pipeline(s). |
1 similar comment
Azure Pipelines successfully started running 1 pipeline(s). |
Co-authored-by: Abram Sanderson <Abram.sanderson@gmail.com>
Nope. It was just wrong behavior, and I fixed it. |
@Abe27342 @tylerbutler all the comment should be addressed. |
/azp run Build - protocol-definitions,Build - test-tools,server-gitrest,server-gitssh,server-historian,server-routerlicious,Build - client packages,repo-policy-check |
Azure Pipelines successfully started running 1 pipeline(s). |
/azp run Build - api-markdown-documenter,Build - benchmark-tool,Build - build-common,Build - build-tools,Build - common-utils,Build - eslint-config-fluid,Build - eslint-plugin-fluid |
Azure Pipelines successfully started running 1 pipeline(s). |
Co-authored-by: Alex Villarreal <716334+alexvy86@users.noreply.github.com>
/azp run Build - api-markdown-documenter,Build - benchmark-tool,Build - build-common,Build - build-tools,Build - common-utils,Build - eslint-config-fluid,Build - eslint-plugin-fluid |
Azure Pipelines successfully started running 1 pipeline(s). |
/azp run Build - protocol-definitions,Build - test-tools,server-gitrest,server-gitssh,server-historian,server-routerlicious,Build - client packages,repo-policy-check |
Azure Pipelines successfully started running 1 pipeline(s). |
Fix group task dependencies: For script task that has "&&" in the command, a sequential group task is created. When building the dependency graph, the latter tasks need to depend on the previous task. However, an "iterator" of previous leaf task is passed to add as dependency for the latter tasks, and if the latter tasks have multiple subtasks, the iterator will only iterate once for the first subtask and miss the other subtask since it doesn't reset. The fix is to just pass the Set into
addDependentLeafTasks
Reduce message clutter:
Additionally, make
getFluidBuildConfig
correctly track whichsearchDir
is using a default config in case it is used with multiplesearchDir
in the future.