Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: remove panic from task graph validation (#5789)
### Description When porting the task graph validation I for some reason added a panic here instead of copying the [Go impl](https://github.com/vercel/turbo/blob/main/cli/internal/core/engine.go#L491) which just skips processing the root node. This PR also shored up some error formatting differences between Rust/Go. I fixed the formatting that's directly related to the validation, but I'll fix the global error formatting differences in a separate PR. ### Testing Instructions Existing integration tests that validate now pass modulo error formatting: ``` [0 olszewski@chriss-mbp] /Users/olszewski/code/vercel/turborepo/turborepo-tests/integration $ EXPERIMENTAL_RUST_CODEPATH=true .cram_env/bin/prysk --shell=bash tests/persistent_dependencies/1-topological.t ! --- tests/persistent_dependencies/1-topological.t +++ tests/persistent_dependencies/1-topological.t.err @@ -14,8 +14,8 @@ // app-a#dev // └── pkg-a#dev $ ${TURBO} run dev - ERROR run failed: error preparing engine: Invalid persistent task configuration: + ERROR run failed: error preparing engine: Invalid persistent task configuration: "pkg-a#dev" is a persistent task, "app-a#dev" cannot depend on it - Turbo error: error preparing engine: Invalid persistent task configuration: + ERROR error preparing engine: Invalid persistent task configuration: "pkg-a#dev" is a persistent task, "app-a#dev" cannot depend on it [1] # Ran 1 tests, 0 skipped, 1 failed. ``` Closes TURBO-1248 --------- Co-authored-by: Chris Olszewski <Chris Olszewski>
- Loading branch information