Title: 7.0 regression: --generateTrace runs out of memory on type-fest's merge-deep.d.ts (6 GB+, 5.9 needs 442 MB) · Issue #65568 · microsoft/TypeScript · GitHub
Open Graph Title: 7.0 regression: --generateTrace runs out of memory on type-fest's merge-deep.d.ts (6 GB+, 5.9 needs 442 MB) · Issue #65568 · microsoft/TypeScript
X Title: 7.0 regression: --generateTrace runs out of memory on type-fest's merge-deep.d.ts (6 GB+, 5.9 needs 442 MB) · Issue #65568 · microsoft/TypeScript
Description: 🔎 Search Terms generateTrace, trace, out of memory, OOM, types.json, type-fest 🕗 Version & Regression Information Works in 5.9.3 Fails in 7.0.2 and 7.1.0-dev.20261118.1 Only with --generateTrace. The same check without tracing completes ...
Open Graph Description: 🔎 Search Terms generateTrace, trace, out of memory, OOM, types.json, type-fest 🕗 Version & Regression Information Works in 5.9.3 Fails in 7.0.2 and 7.1.0-dev.20261118.1 Only with --generateTrace. T...
X Description: 🔎 Search Terms generateTrace, trace, out of memory, OOM, types.json, type-fest 🕗 Version & Regression Information Works in 5.9.3 Fails in 7.0.2 and 7.1.0-dev.20261118.1 Only with --generateTrac...
Opengraph URL: https://github.com/microsoft/TypeScript/issues/65568
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"7.0 regression: --generateTrace runs out of memory on type-fest's merge-deep.d.ts (6 GB+, 5.9 needs 442 MB)","articleBody":"### 🔎 Search Terms\n\ngenerateTrace, trace, out of memory, OOM, types.json, type-fest\n\n### 🕗 Version & Regression Information\n\n- Works in 5.9.3\n- Fails in 7.0.2 and 7.1.0-dev.20261118.1\n- Only with `--generateTrace`. The same check without tracing completes normally.\n\n\n### ⏯ Playground Link\n\n_No response_\n\n### 💻 Code\n\nNo code of my own is needed, a single file from type-fest 6.0.2 is enough:\n\n```sh\nmkdir repro && cd repro && npm init -y\nnpm i -D typescript@7.0.2 type-fest@6.0.2\necho '{ \"compilerOptions\": { \"strict\": true, \"noEmit\": true, \"module\": \"nodenext\", \"target\": \"es2022\", \"lib\": [\"es2022\"], \"types\": [] }, \"files\": [\"node_modules/type-fest/source/merge-deep.d.ts\"] }' > tsconfig.json\nnpx tsc --generateTrace trace\n```\n\n### 🙁 Actual behavior\n\nMemory grows past 6 GB and the process is killed. Only a partial `trace.json` is written, with no `legend.json` or `types_N.json`.\n\n| Run | Peak memory | Result |\n|---|---:|---|\n| 5.9.3 `--generateTrace` | 442 MB | completes |\n| 7.0.2, no trace | 356 MB | completes |\n| 7.0.2 `--generateTrace` | 6.1 GB+ | killed |\n| 7.0.2 `--generateTrace --checkers 1` | 6.1 GB+ | killed |\n| 7.0.2 `--generateTrace --singleThreaded` | 6.1 GB+ | killed |\n| 7.1.0-dev.20261118.1 `--generateTrace` | 6.1 GB+ | killed |\n\nLinux x86_64, 2 CPUs, 8 GB RAM, Node 22.23.5.\n\n### 🙂 Expected behavior\n\nTracing completes with memory in the same range as 5.9, as it already does on other large programs: a dependency-free recursive tuple type creating about 500k types traces fine in 7.0.2 (953 MB).\n\n### Additional information about the issue\n\nImporting anything from `type-fest` without `skipLibCheck` triggers it, so any project using type-fest cannot be traced on 7.0. This breaks trace-based tools such as `@typescript/analyze-trace` for these projects.","author":{"url":"https://github.com/MartinFerret","@type":"Person","name":"MartinFerret"},"datePublished":"2026-11-18T21:50:14Z","url":"https://github.com/microsoft/TypeScript/issues/65568"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:93b4cbfa-aa62-fa8e-98ab-672d6dd86eca |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | B012:272DC0:6B29C4:8A548E:6B00E137 |
| html-safe-nonce | 11a81305904c4f86f38b0301ba3f259ee988a9d99867ddb448a3d2b603b0b3a3 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCMDEyOjI3MkRDMDo2QjI5QzQ6OEE1NDhFOjZCMDBFMTM3IiwidmlzaXRvcl9pZCI6Ijc5OTcwMzI3ODgyODcwODY5MDMiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 045a31bbd5ae1909ab365652368e09ff7487644b96e103131c2bbc2afec0e5e9 |
| hovercard-subject-tag | issue:6477432114 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/microsoft/TypeScript/65568/issue_layout |
| twitter:image | https://opengraph.githubassets.com/88931d619c18f826e1ce35adbcedc337da43844b371c8efc446fb0c92b609fb4/microsoft/TypeScript/issues/65568 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/88931d619c18f826e1ce35adbcedc337da43844b371c8efc446fb0c92b609fb4/microsoft/TypeScript/issues/65568 |
| og:image:alt | 🔎 Search Terms generateTrace, trace, out of memory, OOM, types.json, type-fest 🕗 Version & Regression Information Works in 5.9.3 Fails in 7.0.2 and 7.1.0-dev.20261118.1 Only with --generateTrace. T... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | MartinFerret |
| hostname | github.com |
| expected-hostname | github.com |
| None | 043c3f30fbcbe2c6c8e729e10cbbbc90c406546f9fbbb67c648d38f6b7d16daf |
| turbo-cache-control | no-preview |
| go-import | github.com/microsoft/TypeScript git https://github.com/microsoft/TypeScript.git |
| octolytics-dimension-user_id | 6154722 |
| octolytics-dimension-user_login | microsoft |
| octolytics-dimension-repository_id | 20929025 |
| octolytics-dimension-repository_nwo | microsoft/TypeScript |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 20929025 |
| octolytics-dimension-repository_network_root_nwo | microsoft/TypeScript |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 5425dc24e8bd8d6fca9641a12afc984825a43875 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width