refactor: remove LeafExecutionPath in favor of direct item passing#170
Merged
Brooooooklyn merged 2 commits intomainfrom Feb 24, 2026
Merged
refactor: remove LeafExecutionPath in favor of direct item passing#170Brooooooklyn merged 2 commits intomainfrom
Brooooooklyn merged 2 commits intomainfrom
Conversation
LeafExecutionPath was an indirection layer that built index-pair paths at runtime during graph traversal, only for the reporter to re-traverse the same graph to recover the ExecutionItem it already had. Replace with passing &ExecutionItem and a bool (all_ancestors_single_node) directly. - Remove LeafExecutionPath, ExecutionPathItem, and dead Index impl - Simplify GraphExecutionReporterBuilder::build (no longer needs graph) - Remove Arc<ExecutionGraph> from LabeledGraphReporter - Track single-node ancestry incrementally during graph traversal - Drop smallvec dependency from vite_task crate
…te_leaf Pass &ExecutionItemDisplay and &LeafExecutionKind separately instead of &ExecutionItem. The caller already matches on Leaf(leaf_kind), so decomposing at the call site eliminates the unreachable! branch — the compiler now enforces that execute_leaf can only receive leaf items.
b37503b to
6e53425
Compare
fengmk2
approved these changes
Feb 24, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
LeafExecutionPath,ExecutionPathItem, and deadIndex<&LeafExecutionPath>impl — these built index-pair paths at runtime only for the reporter to re-traverse the graph to find the sameExecutionItemthe executor already had&ExecutionItemandall_ancestors_single_node: booldirectly tonew_leaf_execution, eliminating the round-trip graph lookupArc<ExecutionGraph>fromLabeledGraphReporterand simplifyGraphExecutionReporterBuilder::build(no longer needs the graph)smallvecdependency fromvite_taskcrateNet: -261 lines