turbo
84b1e99f - Ability to configure "persistent" tasks (#2258)

Commit
3 years ago
Ability to configure "persistent" tasks (#2258) This change allows users to add a `persistent` key to their task configuration. This key should be set when the task starts a long-running process that does not exit (such as a dev server or --watch mode for a test runner). When this key is set, turbo will ensure that no other tasks can `dependsOn` this task. Previously, if `Task A` depended on a "persistent" `Task B`, `Task A` would never run, because `Task B` never exited. This caused a lot of confusion, and our advice was to use the `--parallel` flag, which meant that all topological ordering was thrown out the window. After this change, turbo will detect this configuration and throw an error. After talking with users, we realized that there isn't really a need to topologically order long-running tasks, so instead of allowing configuration to create this ordering, (and then bypassing it with `--parallel`), we prevent you from configuring this ordering in the first place! In most cases, that means you can stop using the --parallel flag as well. If we can validate this reasoning, we can will deprecate the --parallel flag over time also.
Author
Parents
Loading