task/internal
Valentin Maerten b8abadb4f0
🐛 fix(output): wrap gitlab sections at task level (#2806)
Previously the gitlab output wrapped each command individually, causing
two visible bugs in real GitLab pipelines:

- every section displayed a duration of 00:00, because start and end
  markers were emitted microseconds apart for instant commands
- the `task: [NAME] CMD` announcement lines were rendered outside the
  sections, because Logger.Errf bypassed the cmd-level wrapper

Fix by wrapping output at the task level via a new optional
[output.TaskWrapper] interface that GitLab implements. Task-scoped
writers are threaded via ctx so nested `task:` invocations produce
properly nested sections (GitLab supports this natively), and deps
running in parallel each get their own buffer with mutex-protected
flushes into the parent's buffer.

- `internal/output/output.go`: add TaskWrapper interface
- `internal/output/gitlab.go`: logic moved from WrapWriter to WrapTask;
  WrapWriter becomes passthrough; sync.Mutex around the buffer for
  concurrent flushes from parallel sub-task sections
- `task_output.go` (new): ctx plumbing + helpers kept out of task.go
- `task.go`: 7 lines of surgical edits — name the lambda's error
  return, wrap before the cmd loop, defer the closer with the final
  error, and swap the cmd announcement to `printCmdAnnouncement` which
  writes into the task-scoped stderr
2026-04-22 17:22:54 +02:00
..
deepcopy fix(includes): propagate silent mode from included Taskfiles to tasks (#2640) 2026-01-25 16:33:52 +01:00
editors feat: nested json (#2415) 2025-09-11 10:26:59 +01:00
env feat(config): add environment variable support for all taskrc options (#2607) 2026-02-18 18:58:13 +01:00
execext fix(shell): fix deprecation warning 2026-01-21 14:05:52 -03:00
filepathext feat: specify --init filename/path (#2018) 2025-02-10 11:22:49 +00:00
fingerprint fix: re-run task when generated files are missing with method: timestamp (#2716) 2026-04-11 21:42:50 -03:00
flags ✨ feat(output): add gitlab output mode (#2806) 2026-04-22 14:10:55 +02:00
fsext fix: address "taskfile not found" in some environments like docker (#2709) 2026-02-27 09:47:59 -03:00
fsnotifyext refactor(fsnotifyext): use Event.Has to check for chmod operations 2025-05-26 16:51:37 -03:00
goext fix(platforms): do not run dynamic vars for other platforms (#1377) 2023-10-22 00:42:26 +00:00
hash fix: adjust run: when_changed to work correctly with imported tasks (#2511) 2025-11-22 17:17:13 -03:00
input feat(vars): add interactive prompting for required variables (#2579) 2026-01-22 21:20:45 +01:00
logger fix: ensure no ansi sequences are printed for --color=false (#2584) 2026-01-18 09:18:52 -03:00
output 🐛 fix(output): wrap gitlab sections at task level (#2806) 2026-04-22 17:22:54 +02:00
slicesext feat: add a new .taskrc.yml to enable experiments (#1982) 2025-02-23 10:51:59 +01:00
sort feat: create NoSort sorter for CLI sort option "none" (#2125) 2025-03-16 13:17:14 +00:00
summary feat(requires): support variable references in enum constraints (#2678) 2026-03-21 11:32:02 +01:00
sysinfo Run Taskfiles from sub/child directories (#920) 2022-12-05 21:58:20 -03:00
templater feat(templater): add absPath template function (#2788) 2026-04-20 21:50:03 +02:00
term chore: add nolint annotations for gosec linter 2026-04-13 10:46:19 -03:00
version v3.50.0 2026-04-13 17:54:26 -03:00