turbo
cbbdc893 - refactor: Route run prelude exclusively through turborepo_log (#12310)

Commit
154 days ago
refactor: Route run prelude exclusively through turborepo_log (#12310) ## Summary Remove the legacy `cprint!` stdout prelude and route all run prelude output exclusively through `turborepo_log`. Fix `TerminalSink` to route info-level events to stdout and warn/error to stderr. ## Changes - **`TerminalSink` now routes by level** — `Info` → stdout, `Warn`/`Error` → stderr. Previously everything went to stderr. - **Removed `print_run_prelude()`** — the `cprint!` stdout path is gone - **Removed `should_print_prelude`**, `hide_prelude()`, and `should_print_prelude_override` - **Added `emit_run_prelude_logs()`** — called once from `commands/run.rs` and once from `watch.rs` after sink wiring is complete - **Added remote cache status** as a `turborepo_log::info()` event ## Guarantees - Prelude fires **exactly once** in both `turbo build` and `turbo watch build` - **TUI mode**: prelude events appear in the log panel (press `l`) - **Stream mode**: prelude events go to stdout via `TerminalSink` (info level) - Watch mode rebuilds do not re-emit the prelude ## Why `cprint!` was a legacy path that duplicated what `turborepo_log` handles. The prelude is status information — in stream mode it belongs on stdout, which `TerminalSink` now supports via level-based routing.
Author
Parents
Loading