turbo
06ee260c - chore: Move `TaskExecutor` to `turborepo-task-executor` crate (#11364)

Commit
51 days ago
chore: Move `TaskExecutor` to `turborepo-task-executor` crate (#11364) ## Summary Extracts the task execution logic from `turborepo-lib` to `turborepo-task-executor`, **removing ~350 lines** from turborepo-lib. This is a true extraction, not just adding abstractions. ### What moved | From turborepo-lib | To turborepo-task-executor | |-------------------|---------------------------| | `ExecContext` | `TaskExecutor<H, E, W, A>` (generic) | | `DryRunExecContext` | `DryRunExecutor<H>` (generic) | | `ExecOutcome` | `ExecOutcome` | | `SuccessOutcome` | `SuccessOutcome` | | `InternalError` | `InternalError` | | `Visitor::prefixed_ui()` | `prefixed_ui()` (standalone) | ### New traits (in turborepo-task-executor) - `HashTrackerProvider` - for tracking task hashes and cache status - `TaskErrorCollector` - for collecting task errors - `TaskWarningCollector` - for collecting task warnings ### Trait implementations - `HashTrackerProvider` for `TaskHashTracker` in turborepo-task-hash - `TaskErrorCollectorWrapper` and `TaskWarningCollectorWrapper` in turborepo-engine - ### Testing - `cargo test -p turborepo-task-executor --lib` - 7 tests pass - `cargo test -p turborepo-lib --lib` - 253 tests pass - `cargo clippy` - Only minor style warnings (present in original code) ### Related PRs - #11357 - turborepo-task-executor crate skeleton - #11358 - Generic CommandProvider trait - #11359 - MfeConfigProvider and TaskAccessProvider traits - #11360 - From<&RunOpts> for ExecutorConfig - #11361 - TurboJsonReader moved to turborepo-turbo-json
Author
Parents
Loading