Rename the experiment from SCOPED_INCLUDES to SCOPED_TASKFILES to better
reflect its expanded scope. This experiment now provides:
1. Variable scoping (existing): includes see only their own vars + parent vars
2. Environment namespace (new): env vars accessible via {{.env.XXX}}
With TASK_X_SCOPED_TASKFILES=1:
- {{.VAR}} accesses vars only (scoped per include)
- {{.env.VAR}} accesses env (OS + Taskfile env:, inherited)
- {{.TASK}} and other special vars remain at root level
This is a breaking change for the experimental feature:
- {{.PATH}} no longer works, use {{.env.PATH}} instead
- Env vars are no longer at root level in templates
When SCOPED_INCLUDES experiment is enabled:
- Resolve vars from DAG instead of merged vars
- Apply root Taskfile vars first (inheritance)
- Then apply task's source Taskfile vars from DAG
- Apply IncludeVars passed via includes: section
- Skip IncludedTaskfileVars (contains parent's vars, not source's)
This ensures tasks in included Taskfiles see:
1. Root vars (inheritance from parent)
2. Their own Taskfile's vars
3. Vars passed through includes: section
4. Call vars and task-level vars
When the SCOPED_INCLUDES experiment is enabled, variables from included
Taskfiles are no longer merged globally. They remain in their original
Taskfile within the DAG.
Exception: flatten includes still merge variables globally to allow
sharing common variables across multiple Taskfiles.
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.
* refactor: executor functional options
* refactor: minor tidy up of list code
* fix: WithVersionCheck missing from call to NewExecutor
* feat: docstrings for structs with functional options
* refactor: prefix the functional options with the name of the struct they belong to
* refactor: remove logger from the taskfile node interface
* refactor: functional options on taskfile.Reader
* feat: use pass in debug/prompt functions to Reader rather than task Logger
* chore: reader docstrings
* fix: typo
* feat: update minimum version to 1.22
* refactor: use int range iterator
* refactor: loop variables
* refactor: replace slicesext.FirstNonZero with cmp.Or
* refactor: use slices.Concat instead of append
* fix: unused param
* fix: linting
* feat: Colorize tasks in prefixed output
* chore: comment and style changes
* fix code tag has spaces in api reference
* fix: migrate to use logger for colors
* fix: Add bright colors to the color sequence
* fix: make colorized prefix logger standard
* feat: remote taskfiles over http
* feat: allow insecure connections when --insecure flag is provided
* feat: better error handling for fetch errors
* fix: ensure cache directory always exists
* fix: setup logger before everything else
* feat: put remote taskfiles behind an experiment
* feat: --download and --offline flags for remote taskfiles
* feat: node.Read accepts a context
* feat: experiment docs
* chore: changelog
* chore: remove unused optional param from Node interface
* chore: tidy up and generalise NewNode function
* fix: use sha256 in remote checksum
* feat: --download by itself will not run a task
* feat: custom error if remote taskfiles experiment is not enabled
* refactor: BaseNode functional options and simplified FileNode
* fix: use hex encoding for checksum instead of b64
* refactor: move deepcopy into its own package
* feat: add generic orderedmap implementation
* refactor: implement tasks with orderedmap
* feat: implement sort flag for all task outputs
* refactor: implement vars with orderedmap
* chore: docs
* fix: linting issues
* fix: non deterministic behavior in tests