turborepo
213305b1 - feat: hook up task cache (#6117)

Commit
2 years ago
feat: hook up task cache (#6117) ### Description This PR hooks up the task cache to task execution. The first commit adds a new method on child process that allows for both stdout/stderr to be written to a single write. If you see a better way to allow both streams to write to the same `Write` type please point it out, I don't love having two very similar methods. Next commit actually hooks up the task cache during task execution. Known issues: - The task execution code has gotten super cluttered. I do want to break up this function in the near future - Log replaying sometimes has issues. I've diffed the log files between the Rust and Go implementations and they end up in the file the same, but getting replayed there appears to be some issues. ### Testing Instructions Use it! ``` [0 olszewski@chriss-mbp] /tmp/testing $ turbo_dev build --experimental-rust-codepath --force web:build: cache bypass, force executing db159628c115329d docs:build: cache bypass, force executing 5a3238fbb7af1c6a docs:build: docs:build: > docs@1.0.0 build /private/tmp/testing/apps/docs docs:build: > next build docs:build: web:build: web:build: > web@1.0.0 build /private/tmp/testing/apps/web web:build: > next build web:build: docs:build: - info Creating an optimized production build... web:build: - info Creating an optimized production build... ... [0 olszewski@chriss-mbp] /tmp/testing $ turbo_dev build --experimental-rust-codepath web:build: cache hit (outputs already on disk), suppressing logs db159628c115329d docs:build: cache hit (outputs already on disk), suppressing logs 5a3238fbb7af1c6a web:build: web:build: > web@1.0.0 build /private/tmp/testing/apps/web web:build: > next build web:build: web:build: - info Creating an optimized production build... docs:build: docs:build: > docs@1.0.0 build /private/tmp/testing/apps/docs docs:build: > next build web:build: - info Compiled successfully web:build: - info Linting and checking validity of types... web:build: - info Collecting page data... ``` Closes TURBO-1432 --------- Co-authored-by: Chris Olszewski <Chris Olszewski>
Parents
Loading