Repository navigation
Description
Summary
Every tsc invocation goes through BlockStreamFilter — src/cmds/js/tsc_cmd.rs::run() has no passthrough. When the compiler exits 0 and emits nothing the block handler recognises as a diagnostic, format_summary returns TypeScript: No errors found and the real output is discarded.
That is correct for an actual clean typecheck, but wrong for every informational subcommand:
rtk tsc --showConfig # JSON config -> "TypeScript: No errors found"
rtk tsc --listFiles # file list -> "TypeScript: No errors found"
rtk tsc --init # created tsconfig -> "TypeScript: No errors found"
rtk tsc --help # help text -> "TypeScript: No errors found"
rtk tsc -v # version -> "TypeScript: No errors found"Why it is unrecoverable
Unlike the non-zero-exit path, there is no tee fallback. TeeConfig defaults to TeeMode::Failures (src/core/tee.rs:325), and should_tee returns None when exit_code == 0 (src/core/tee.rs:~103). No raw file is written and no recovery hint is printed, so the output is simply gone — rtk proxy tsc --showConfig is the only way to get it back.
Cause
src/cmds/js/tsc_cmd.rs, TscHandler::format_summary:
if self.error_count == 0 {
if exit_code == 0 {
return Some("TypeScript: No errors found\n".to_string());
}
// ... non-zero path reports the failure with a head/tail of raw
}BlockStreamFilter drops any line that is neither a block start nor a continuation, so the JSON / file list / help text never reaches stdout, and the summary asserts a typecheck that never happened.
Scope note
This is pre-existing, not a regression: before #2232 the same function returned TypeScript: No errors found unconditionally whenever error_count == 0. #2232 hardened the exit_code != 0 half (that is #3220); this issue is the exit-0 half, filed separately so #2232 does not grow.
Suggested fix
Either:
- Guard the success summary on "exit 0 and raw output is trivial", passing raw through otherwise — the analogue of the non-zero branch; or
- Detect informational flags in
run()(--showConfig,--listFiles,--listFilesOnly,--init,--help,-h,--version,-v) and route them straight to passthrough, which is cheaper and has no false-negative risk.
Option 2 is narrower and matches how other filters special-case non-diagnostic subcommands.
Related
- tsc filter: "TypeScript: No errors found" is printed on a non-zero exit, so a tsc that never ran reads as a clean typecheck #3220 — the non-zero-exit half of the same false-green, fixed by fix(tsc): handle pretty diagnostics #2232
- tsc wrapper: --pretty flag suppresses errors and prints fake "compilation completed" success message #1772 — the
--prettyhalf, also fixed by fix(tsc): handle pretty diagnostics #2232 - Tool filters mask hard failures with benign summaries (pytest collection error -> "No tests collected") #2317 — umbrella: filters masking real state with benign summaries
- ruff subcommand misrouting: rule, config, linter, etc. get check --output-format=json injected #2669 — same shape for
ruff(non-diagnostic subcommands misrouted into the diagnostic filter)
Activity
rtk-release-bot commentedon Nov 30, 2026
This issue has been automatically marked as stale due to 90 days of inactivity. If this issue is still affecting you, please leave any comment (for example, "bump"), and we'll keep it open. We are sorry that we haven't been able to prioritize it yet.