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.
This commit is contained in:
Valentin Maerten
2025-12-26 20:54:33 +01:00
parent 1b418409d1
commit 9732f7e08b
2 changed files with 2 additions and 0 deletions

View File

@@ -63,6 +63,7 @@ type (
// Internal
Taskfile *ast.Taskfile
Graph *ast.TaskfileGraph
Logger *logger.Logger
Compiler *Compiler
Output output.Output

View File

@@ -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
}