swc-project/swc · info
We don't care about this file
Error message
We don't care about this file
What it means
Not a real failure: when dbg-swc runs as a creduce interestingness test (CREDUCE_MODE=SIZE), SIZE mode compares SWC's minified output length against terser's; if SWC's output is not larger, the file cannot expose a size regression, so the run bails with this sentinel to exit non-zero, which creduce interprets as 'not interesting'. The complementary case (SWC output strictly larger) returns Ok and exits 0. Treat this message as a filter signal, never as a bug.
Source
Thrown at crates/dbg-swc/src/main.rs:91
HANDLER.set(handler, || {
//
let input = PathBuf::from(
env::var(CREDUCE_INPUT_ENV_VAR)
.expect("creduce is invoked without the name of input file"),
);
if mode == "SIZE" {
let m = get_minified(cm.clone(), &input, true, true)?;
let swc_output = print_js(cm.clone(), &m.module, true)?;
let terser_output = get_terser_output(&input, true, true)?;
if swc_output.trim().len() > terser_output.trim().len() {
// It's interesting, as our output is larger than terser's.
return Ok(());
}
bail!("We don't care about this file")
} else if mode == "SEMANTICS" {
let m = get_minified(cm.clone(), &input, true, false)?;
let swc_output = print_js(cm.clone(), &m.module, true)?;
let terser_output = get_terser_output(&input, true, false)?;
if swc_output.trim() == terser_output.trim() {
bail!("We don't care about this file")
}
// It's interesting, as our output may have a bug
Ok(())
} else {
unreachable!("Unknown mode `{}`", mode)
}
})View on GitHub (pinned to 5176682b65)
Solutions
- No fix needed under creduce: non-zero exit for uninteresting files is the designed contract
- If you see it outside creduce, unset CREDUCE_MODE (and CREDUCE_INPUT) from the environment
- Remember the success condition in SIZE mode: exit 0 only when swc output is strictly larger than terser's
Example fix
# before: sentinel mistaken for a crash in scripts
run_dbg() { dbg-swc es minifier ... ; }
# after: treat this exact message as 'skip', not failure
if out=$(dbg-swc es minifier ... 2>&1); then exit 0; fi
case "$out" in
*"We don't care about this file"*) exit 1 ;; # not interesting
*) exit 2 ;; # real failure
esac Defensive patterns
Strategy: try-catch
Try / catch
# creduce interestingness wrapper: distinguish the skip sentinel from real crashes if out=$(dbg-swc es minifier ... 2>&1); then exit 0 # interesting: swc output larger than terser's fi case "$out" in *"We don't care about this file"*) exit 1 ;; # not interesting - by design *) exit 2 ;; # real failure - inspect output esac
Prevention
- When scripting around dbg-swc under creduce, match this exact message as 'skip', not 'error'
- Unset CREDUCE_MODE before running dbg-swc interactively
- Remember SIZE-mode success requires swc output to be strictly larger than terser's
When it happens
Trigger: CREDUCE_MODE=SIZE set (creduce invokes dbg-swc per candidate) and the candidate's swc-minified output length is less than or equal to the terser output length; the bail is the intended skip signal.
Common situations: Reading creduce logs and mistaking the sentinel for a crash; accidentally exporting CREDUCE_MODE in the environment so normal dbg-swc runs take the creduce path; debugging why most candidate files 'error out' during a reduction session (by design).
Related errors
- `npm run build` failed
- Infinite loop detected (current pass = {}) {}
- failed to parse `global_defs.{k}` of minifier options: {err:
- Value of `global_defs.{k}` must be a string literal:
- failed to parse `pure_funcs` of minifier options: {err:?}
AI-assisted analysis of swc-project/swc@5176682b65 (2026-08-17).
Data as JSON: /api/errors/ad4f9e37dd17aa72.
Report an issue: GitHub.