From 9732f7e08bfb0f38019c5b5b511794f74b1b62c3 Mon Sep 17 00:00:00 2001 From: Valentin Maerten Date: Fri, 26 Dec 2025 20:54:33 +0100 Subject: [PATCH] feat(executor): store TaskfileGraph for lazy resolution Store the TaskfileGraph in the Executor so it can be used for lazy variable resolution when SCOPED_INCLUDES experiment is enabled. The graph is now preserved after reading, before merging into the final Taskfile. This allows traversing the DAG at runtime to resolve variables from the correct scope. --- executor.go | 1 + setup.go | 1 + 2 files changed, 2 insertions(+) diff --git a/executor.go b/executor.go index 43b8bacf..a6632a30 100644 --- a/executor.go +++ b/executor.go @@ -63,6 +63,7 @@ type ( // Internal Taskfile *ast.Taskfile + Graph *ast.TaskfileGraph Logger *logger.Logger Compiler *Compiler Output output.Output diff --git a/setup.go b/setup.go index fbbe64e7..8b3eca10 100644 --- a/setup.go +++ b/setup.go @@ -104,6 +104,7 @@ func (e *Executor) readTaskfile(node taskfile.Node) error { } return err } + e.Graph = graph if e.Taskfile, err = graph.Merge(); err != nil { return err }