{"record":{"id":"111bcf997c92493b","repo":"denoland/deno","slug":"exiting-due-to-deno-internal-fast-check-overwrite","errorCode":null,"errorMessage":"Exiting due to DENO_INTERNAL_FAST_CHECK_OVERWRITE","messagePattern":"Exiting due to DENO_INTERNAL_FAST_CHECK_OVERWRITE","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"info","filePath":"cli/tools/publish/mod.rs","lineNumber":459,"sourceCode":"        );\n      }\n\n      for module in graph.modules() {\n        if module.specifier().scheme() != \"file\" {\n          continue;\n        }\n        let Some(js) = module.js() else {\n          continue;\n        };\n        if let Some(module) = js.fast_check_module() {\n          std::fs::write(\n            js.specifier.to_file_path().unwrap(),\n            module.source.as_ref(),\n          )?;\n        }\n      }\n\n      bail!(\"Exiting due to DENO_INTERNAL_FAST_CHECK_OVERWRITE\")\n    } else {\n      log::info!(\"Checking for slow types in the public API...\");\n      for package in package_configs {\n        let export_urls = package.config_file.resolve_export_value_urls()?;\n        let diagnostics =\n          collect_no_slow_type_diagnostics(&graph, &export_urls);\n        if !diagnostics.is_empty() {\n          for diagnostic in diagnostics {\n            diagnostics_collector\n              .push(PublishDiagnostic::FastCheck(diagnostic));\n          }\n        }\n      }\n\n      // skip type checking the slow type graph if there are any errors because\n      // errors like remote modules existing will cause type checking to crash\n      if diagnostics_collector.has_error() {\n        Ok(Arc::new(graph))","sourceCodeStart":441,"sourceCodeEnd":477,"githubUrl":"https://github.com/denoland/deno/blob/f7822238cab635a3a19f99f493f675fa81a7f9d8/cli/tools/publish/mod.rs#L441-L477","documentation":"With `DENO_INTERNAL_FAST_CHECK_OVERWRITE=1`, publish writes each file module's fast-check (public API) output back to the source files on disk, then deliberately stops with this bail before type checking and publishing continue — nothing is uploaded. It is the internal mode's designed early exit, not a failure of your package.","triggerScenarios":"Running `deno publish` with `DENO_INTERNAL_FAST_CHECK_OVERWRITE=1` and a clean repo: after overwriting the module sources, execution always terminates here.","commonSituations":"Deno internal development workflows that regenerate fast-check output and diff it (e.g. `git diff` afterwards) in CI.","solutions":["Treat this exit as success when using the flag — the file rewrite already happened; inspect the result with `git diff`.","Unset the env var to run a normal publish: `unset DENO_INTERNAL_FAST_CHECK_OVERWRITE`."],"exampleFix":"# before: unexpected non-zero exit breaks scripts\nDENO_INTERNAL_FAST_CHECK_OVERWRITE=1 deno publish --dry-run\n# after: the rewrite is the goal, so accept the designed stop\nDENO_INTERNAL_FAST_CHECK_OVERWRITE=1 deno publish --dry-run || true\ngit diff --stat","handlingStrategy":"fallback","validationCode":"#!/usr/bin/env bash\nif [ \"${DENO_INTERNAL_FAST_CHECK_OVERWRITE:-}\" = \"1\" ]; then\n  deno publish --dry-run || true   # designed stop after the source rewrite\n  git diff --stat                  # inspect the rewritten output\nelse\n  deno publish\nfi","typeGuard":null,"tryCatchPattern":"# the bail is the internal mode's success path — branch on the env var, not the exit code\nif DENO_INTERNAL_FAST_CHECK_OVERWRITE=1 deno publish --dry-run; then\n  : # unexpected: mode should stop with the bail\nelse\n  rc=$?\n  [ \"$rc\" -ne 0 ] && echo \"fast-check rewrite finished (exit $rc is expected)\"\nfi","preventionTips":["Treat a non-zero exit after DENO_INTERNAL_FAST_CHECK_OVERWRITE=1 as the expected stop, not a failure.","Never leave the env var set for real publishes — it always terminates before uploading.","Follow the run with `git diff` to review the rewritten public-API output."],"tags":["publish","internal","fast-check","early-exit"],"backgroundTag":"internal-tool-early-exit","analyzedSha":"f7822238cab635a3a19f99f493f675fa81a7f9d8","analyzedAt":"2026-08-20T13:07:44.778Z","contentChangedAt":"2026-08-20T13:07:44.778Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}