Skip to content

refactor: remove LeafExecutionPath in favor of direct item passing#170

Merged
Brooooooklyn merged 2 commits intomainfrom
refactor/remove-leaf-execution-path
Feb 24, 2026
Merged

refactor: remove LeafExecutionPath in favor of direct item passing#170
Brooooooklyn merged 2 commits intomainfrom
refactor/remove-leaf-execution-path

Conversation

@branchseer
Copy link
Copy Markdown
Member

Summary

  • Remove LeafExecutionPath, ExecutionPathItem, and dead Index<&LeafExecutionPath> impl — these built index-pair paths at runtime only for the reporter to re-traverse the graph to find the same ExecutionItem the executor already had
  • Pass &ExecutionItem and all_ancestors_single_node: bool directly to new_leaf_execution, eliminating the round-trip graph lookup
  • Remove Arc<ExecutionGraph> from LabeledGraphReporter and simplify GraphExecutionReporterBuilder::build (no longer needs the graph)
  • Track single-node ancestry incrementally during graph traversal instead of recomputing it from the path
  • Drop smallvec dependency from vite_task crate

Net: -261 lines

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.
@branchseer branchseer force-pushed the refactor/remove-leaf-execution-path branch from b37503b to 6e53425 Compare February 24, 2026 03:55
@Brooooooklyn Brooooooklyn merged commit 3d1554b into main Feb 24, 2026
12 checks passed
@Brooooooklyn Brooooooklyn deleted the refactor/remove-leaf-execution-path branch February 24, 2026 05:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants