mirror of
https://github.com/go-task/task.git
synced 2025-12-01 22:52:02 +02:00
feat: implement gentle force experiment draft (#1216)
* feat: implement gentle force experiment draft * docs: changelog
This commit is contained in:
@@ -70,6 +70,27 @@ version 3 as soon as possible.
|
||||
A list of changes between version 2 and version 3 are available in the [Task v3
|
||||
Release Notes][version-3-release-notes].
|
||||
|
||||
### ![experiment] Gentle Force ([#1200](https://github.com/go-task/task/issues/1200))
|
||||
|
||||
- Environment variable: `TASK_X_FORCE=1`
|
||||
- Breaks: `--force` flag
|
||||
|
||||
The `--force` flag currently forces _all_ tasks to run regardless of the status
|
||||
checks. This can be useful, but we have found that most of the time users only
|
||||
expect the direct task they are calling to be forced and _not_ all of its
|
||||
dependant tasks.
|
||||
|
||||
This experiment changes the `--force` flag to only force the directly called
|
||||
task. All dependant tasks will have their statuses checked as normal and will
|
||||
only run if Task considers them to be out of date. A new `--force-all` flag will
|
||||
also be added to maintain the current behavior for users that need this
|
||||
functionality.
|
||||
|
||||
If you want to migrate, but continue to force all dependant tasks to run, you
|
||||
should replace all uses of the `--force` flag with `--force-all`. Alternatively,
|
||||
if you want to adopt the new behavior, you can continue to use the `--force`
|
||||
flag as you do now!
|
||||
|
||||
<!-- prettier-ignore-start -->
|
||||
[breaking-change-proposal]: https://github.com/go-task/task/discussions/1191
|
||||
[deprecate-version-2-schema]: https://github.com/go-task/task/issues/1197
|
||||
|
||||
Reference in New Issue
Block a user