Commit Graph

2633 Commits

Author SHA1 Message Date
Valentin Maerten
efaea39503 test(scoped-includes): add tests for variable isolation
Tests verify:
- Legacy mode: vars merged globally (A sees B's VAR, can access UNIQUE_B)
- Scoped mode: vars isolated (A sees own VAR, cannot access UNIQUE_B)
- Inheritance: includes can still access root vars (ROOT_VAR)

Test structure:
- testdata/scoped_includes/ with main Taskfile and two includes
- inc_a and inc_b both define VAR with different values
- Cross-include test shows A trying to access B's UNIQUE_B
2026-01-25 19:53:38 +01:00
Valentin Maerten
04b8b75525 feat(compiler): implement lazy variable resolution for scoped includes
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
2026-01-25 19:53:04 +01:00
Valentin Maerten
0dbeaaf187 feat(taskfile): skip var merge when SCOPED_INCLUDES enabled
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.
2026-01-25 19:53:04 +01:00
Valentin Maerten
da927ad5fe feat(graph): add Root() helper method
Add Root() method to TaskfileGraph to get the root vertex (entrypoint
Taskfile). This will be used for lazy variable resolution.

Note: Tasks already have Location.Taskfile which can be used to find
their source Taskfile in the graph, so GetVertexByNamespace is not
needed.
2026-01-25 19:49:16 +01:00
Valentin Maerten
9732f7e08b 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.
2026-01-25 19:49:16 +01:00
Valentin Maerten
1b418409d1 feat(experiments): add SCOPED_INCLUDES experiment
Add new experiment flag TASK_X_SCOPED_INCLUDES for scoped variable
resolution in included Taskfiles. When enabled, variables from included
Taskfiles will be isolated rather than merged globally.

This is the first step towards implementing lazy DAG-based variable
resolution with strict isolation between includes.
2026-01-25 19:49:16 +01:00
Valentin Maerten
026c899d90 feat: support self-signed certificates for remote taskfiles (#2537) 2026-01-25 18:51:30 +01:00
Timothy Rule
f6720760b4 fix(includes): propagate silent mode from included Taskfiles to tasks (#2640) 2026-01-25 16:33:52 +01:00
Valentin Maerten
065236f076 chore: changelog for #2635 2026-01-25 16:08:11 +01:00
Timothy Rule
1bd5aa6bd5 fix: correct the value of ROOT_TASKFILE when no entrypoint (#2635) 2026-01-25 16:06:13 +01:00
Valentin Maerten
c3fd3c4b5e chore: add website/.netlify to gitignore 2026-01-25 14:26:53 +01:00
Valentin Maerten
299232ee7d fix(website): improve SEO with favicons, structured data and robots.txt (#2657) 2026-01-25 14:16:23 +01:00
Andrey Nering
12a26fa15e v3.47.0 v3.47.0 2026-01-24 20:49:48 -03:00
Andrey Nering
4ab5dec8ae fix(website): have the actual page title on open graph and twitter tags 2026-01-24 20:48:51 -03:00
Andrey Nering
af311229fe docs: new blog post about if: and required variables prompt 2026-01-24 20:48:51 -03:00
Andrey Nering
1443e2d989 chore(deps): update mvdan/sh once again
Closes #2650
2026-01-24 20:48:51 -03:00
Andrey Nering
5bf4e4a29b chore(deps): revert mvdan/sh to latest stable version (#2651)
There is an important regression on interactive commands here. See #2650
and mvdan/sh#1242.

Once mvdan/sh#1244 is merged we'll upgrade again.
2026-01-24 22:21:30 +00:00
Andrey Nering
f9052c9fdf chore(taskfile): add go.mod as a dependency of install 2026-01-24 18:49:38 -03:00
Valentin Maerten
0a82e2e053 chore: changelog for #2579 2026-01-22 21:22:47 +01:00
Valentin Maerten
6dedcafd7d feat(vars): add interactive prompting for required variables (#2579) 2026-01-22 21:20:45 +01:00
Valentin Maerten
c84cfa41f7 chore: changelog for #2564 2026-01-21 23:06:59 +01:00
Valentin Maerten
9bc1efbc47 feat: add conditional execution for tasks and commands (#2564) 2026-01-21 23:05:40 +01:00
Andrey Nering
da7eb0c855 fix(shell): fix deprecation warning 2026-01-21 14:05:52 -03:00
Andrey Nering
edb491a4d0 chore(deps): update shell interpreter
Closes #2446
Ref mvdan/sh#1182
Ref mvdan/sh#1241
2026-01-21 14:05:52 -03:00
renovate[bot]
2ad3d26f4a chore(deps): update all non-major dependencies (#2637)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-01-19 21:09:40 +01:00
renovate[bot]
cdfcd08213 chore(deps): update actions/checkout action to v6 (#2638)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-01-19 21:08:59 +01:00
Valentin Maerten
382c37bc2a chore: changelog for #2234 2026-01-18 19:07:13 +01:00
Valentin Maerten
618cd8956f feat: wildcard match aliases (#2234) 2026-01-18 19:05:29 +01:00
Andrey Nering
b53e5da41a docs(changelog): add entry for #2584 2026-01-18 09:20:00 -03:00
Timothy Rule
b9c1ab8eae fix: ensure no ansi sequences are printed for --color=false (#2584) 2026-01-18 09:18:52 -03:00
Andrey Nering
e47f55783e docs(changelog): add entry for #1566, #2633 2026-01-18 08:44:50 -03:00
Timothy Rule
d5f071c096 fix: print prefix when task is up-to-date and output-style is prefixed (#2633) 2026-01-18 08:42:18 -03:00
Andrey Nering
fb784f4e3d chore(taskfile): create tag as annotated and add message automatically 2026-01-18 08:35:23 -03:00
renovate[bot]
91f9299c98 chore(deps): update all non-major dependencies (#2611)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-01-14 21:07:58 +01:00
Valentin Maerten
145412a75c chore: changelog for #2602 2026-01-14 19:51:00 +01:00
Valentin Maerten
ba38344ca6 fix: remote git taskfile cloning and directory includes (#2602) 2026-01-14 19:43:39 +01:00
Valentin Maerten
4e963f8714 feat(ci): add on-demand PR build workflow (#2578) 2026-01-14 19:41:50 +01:00
Bouke Versteegh
3d4d189bcd docs: clarify dotenv file precedence when multiple files are specified (#2628) 2026-01-14 19:37:41 +01:00
Andrey Nering
179bde1f37 v3.46.4 v3.46.4 2025-12-24 18:57:17 -03:00
Andrey Nering
e4de687aee docs(changelog): add entry for #2592 2025-12-24 18:55:21 -03:00
WinkelCode
06538860a8 fix(completion): use posix whitespace in fish sed regex (#2592) 2025-12-24 18:48:54 -03:00
renovate[bot]
8a37bf5c1f chore(deps): update all non-major dependencies (#2598)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-12-23 20:36:40 +01:00
Valentin Maerten
ca99266aea feat(schema): add cache-dir property to taskrc schema (#2603) 2025-12-23 20:35:57 +01:00
Andrey Nering
8dfafe507f v3.46.3 v3.46.3 2025-12-19 15:50:51 -03:00
Andrey Nering
678fdec7d2 docs(changelog): add entry for #2593 and #2594 2025-12-19 15:50:33 -03:00
Valentin Maerten
3626b271a7 fix(completion): correct zsh pattern matching for global flag (#2594) 2025-12-19 15:48:59 -03:00
Andrey Nering
fc378cfb92 v3.46.2 v3.46.2 2025-12-18 17:55:19 -03:00
Andrey Nering
9488a2a744 docs(changelog): add entry for #2588 and #2589 2025-12-18 17:54:38 -03:00
Andrey Nering
6ece2445ae docs(changelog): change tag to match release on github 2025-12-18 17:51:33 -03:00
Valentin Maerten
9b95e758f4 fix: cli variables should take priority over aaskfile defaults (#2589)
When using `task FOO=bar` with a Taskfile containing
`FOO: '{{.FOO | default "foo"}}'`, the CLI value was being
overwritten by the Taskfile default.

Split the variable merging into two steps:
1. Merge CLI variables (FOO=bar) first so they override Taskfile vars
2. ReverseMerge special variables (CLI_ARGS, CLI_FORCE, etc.) so
   they're available for templating in Taskfile vars

Fixes regression introduced in #2403.

Co-authored-by: Timothy Rule <timothy.rule@gmail.com>
2025-12-18 17:50:00 -03:00