turbo
357eb3e4 - feat: port task graph construction (#5652)

Commit
3 years ago
feat: port task graph construction (#5652) ### Description This PR ports the `Engine` structure from Go and its construction. It doesn't port the execution of the task graph or the validation of persistent task dependencies. Major changes: - Introduction of `TaskId` and `TaskName` (originally in #5588, but kept here since this PR actually exercises the types) - We now parse task names as `TaskName` where applicable instead of `String` - Synthesizing a single task definition from multiple `turbo.json`, this is ported from Go in a very straightforward way. Post port, there's some work that can be done to greatly simplify the types involved with task definitions. Reviewer notes: Saving `EngineBuilder` for last makes sense as all of the other changes are smaller and mostly contained to the file they happen in. The construction logic is almost 1:1 with the Go's `Engine.Prepare` logic including some of the oddities that it contains. ### Testing Instructions Tests mostly come from [`engine_test.go`](https://github.com/vercel/turbo/blob/b8c55756a68779b85f695501ed7fdd644a8e7487/cli/internal/core/engine_test.go) unit tests that were removed. Additional unit tests were added, but we'll be relying on hooking this up to the rest of run and running against integration tests to make sure behavior is the same. --------- Co-authored-by: Chris Olszewski <Chris Olszewski>
Parents
Loading