Fix termination handling#95692
Merged
Merged
Conversation
Contributor
Tests PassedCommit: 946e81f |
Contributor
Stats from current PR🔴 4 regressions
📊 All Metrics📖 Metrics GlossaryDev Server Metrics:
Build Metrics:
Change Thresholds:
⚡ Dev Server
📦 Dev Server (Webpack) (Legacy)📦 Dev Server (Webpack)
⚡ Production Builds
📦 Production Builds (Webpack) (Legacy)📦 Production Builds (Webpack)
📦 Bundle SizesBundle Sizes⚡ TurbopackClient Main Bundles
Server Middleware
Build DetailsBuild Manifests
📦 WebpackClient Main Bundles
Polyfills
Pages
Server Edge SSR
Middleware
Build DetailsBuild Manifests
Build Cache
🔄 Shared (bundler-independent)Runtimes
📝 Changed Files (2 files)Files with changes:
View diffspages-api.ru..time.prod.jsDiff too large to display pages.runtime.prod.jsDiff too large to display 📎 Tarball URLCommit: 946e81f |
andrewimm
approved these changes
Jul 13, 2026
43cfae9 to
946e81f
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Follow-ups for the experimental TypeScript CLI checker
Two independent improvements to the
experimental.useTypeScriptClibuild path.1. Make
tscresponsive to interruptionWhen
next buildis interrupted (Ctrl-C /SIGTERM), the TypeScript 7 native compiler could keep running to completion instead of stopping — leaving a CPU-heavy process alive after the build was abandoned.The teardown already handled termination signals and killed the whole process group; the problem was the signal it sent. The native compiler ignores
SIGTERM/SIGINT, so the graceful signal never stopped it. We now escalate toSIGKILL(Windows:taskkill /T /F), which reaps the compiler on interrupt (measured ~200ms vs. running to completion).The compiler's signal handling may be improved upstream — see microsoft/typescript-go#4592, in the mean time we should just send a kill signal
2. Skip the jest worker for the CLI checker
The type-check runs in a jest worker to isolate the TypeScript compiler-API heap so it can be freed after checking. In CLI mode the compiler runs in a separate
tscprocess, so there is no heap to isolate. Just spawn tsc from the parent process.Testing
runTypeScriptCli(spawn options, group-SIGKILL teardown, signal handling, listener cleanup, captured-output decoding).test/production/app-dir/typescript-cliintegration suite passes (TS 6, TS 7, opt-in-required,ignoreBuildErrors,--debug-build-paths).