{"record":{"id":"ad4f9e37dd17aa72","repo":"swc-project/swc","slug":"we-don-t-care-about-this-file","errorCode":null,"errorMessage":"We don't care about this file","messagePattern":"We don't care about this file","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"info","filePath":"crates/dbg-swc/src/main.rs","lineNumber":91,"sourceCode":"                    HANDLER.set(handler, || {\n                        //\n                        let input = PathBuf::from(\n                            env::var(CREDUCE_INPUT_ENV_VAR)\n                                .expect(\"creduce is invoked without the name of input file\"),\n                        );\n\n                        if mode == \"SIZE\" {\n                            let m = get_minified(cm.clone(), &input, true, true)?;\n\n                            let swc_output = print_js(cm.clone(), &m.module, true)?;\n\n                            let terser_output = get_terser_output(&input, true, true)?;\n                            if swc_output.trim().len() > terser_output.trim().len() {\n                                // It's interesting, as our output is larger than terser's.\n                                return Ok(());\n                            }\n\n                            bail!(\"We don't care about this file\")\n                        } else if mode == \"SEMANTICS\" {\n                            let m = get_minified(cm.clone(), &input, true, false)?;\n\n                            let swc_output = print_js(cm.clone(), &m.module, true)?;\n\n                            let terser_output = get_terser_output(&input, true, false)?;\n\n                            if swc_output.trim() == terser_output.trim() {\n                                bail!(\"We don't care about this file\")\n                            }\n\n                            // It's interesting, as our output may have a bug\n\n                            Ok(())\n                        } else {\n                            unreachable!(\"Unknown mode `{}`\", mode)\n                        }\n                    })","sourceCodeStart":73,"sourceCodeEnd":109,"githubUrl":"https://github.com/swc-project/swc/blob/5176682b65416c6b5de6b47379ae1588ea3ecb3f/crates/dbg-swc/src/main.rs#L73-L109","documentation":"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.","triggerScenarios":"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.","commonSituations":"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).","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"],"exampleFix":"# before: sentinel mistaken for a crash in scripts\nrun_dbg() { dbg-swc es minifier ... ; }\n\n# after: treat this exact message as 'skip', not failure\nif out=$(dbg-swc es minifier ... 2>&1); then exit 0; fi\ncase \"$out\" in\n  *\"We don't care about this file\"*) exit 1 ;; # not interesting\n  *) exit 2 ;;                                   # real failure\nesac","handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"# creduce interestingness wrapper: distinguish the skip sentinel from real crashes\nif out=$(dbg-swc es minifier ... 2>&1); then\n  exit 0                            # interesting: swc output larger than terser's\nfi\ncase \"$out\" in\n  *\"We don't care about this file\"*) exit 1 ;;  # not interesting - by design\n  *) exit 2 ;;                                   # real failure - inspect output\nesac","preventionTips":["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"],"tags":["dbg-swc","creduce","minifier","sentinel"],"backgroundTag":null,"analyzedSha":"5176682b65416c6b5de6b47379ae1588ea3ecb3f","analyzedAt":"2026-08-17T16:16:52.067Z","contentChangedAt":"2026-08-17T16:16:52.067Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}