René's URL Explorer Experiment


Title: Incremental compile panics on a failed output write, or never retries it · Issue #64875 · microsoft/TypeScript · GitHub

Open Graph Title: Incremental compile panics on a failed output write, or never retries it · Issue #64875 · microsoft/TypeScript

X Title: Incremental compile panics on a failed output write, or never retries it · Issue #64875 · microsoft/TypeScript

Description: 🔎 Search Terms TS5033, Could not write file, panic, nil pointer dereference, diagnosticToStringBuilder, incremental, tsbuildinfo, up to date 🕗 Version & Regression Information This is the behavior in every version I tried: 7.0.2 and 7.1....

Open Graph Description: 🔎 Search Terms TS5033, Could not write file, panic, nil pointer dereference, diagnosticToStringBuilder, incremental, tsbuildinfo, up to date 🕗 Version & Regression Information This is the behavior ...

X Description: 🔎 Search Terms TS5033, Could not write file, panic, nil pointer dereference, diagnosticToStringBuilder, incremental, tsbuildinfo, up to date 🕗 Version & Regression Information This is the behav...

Opengraph URL: https://github.com/microsoft/TypeScript/issues/64875

X: @github

direct link

Domain: github.com

IPv4 address: 140.82.114.3


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Incremental compile panics on a failed output write, or never retries it","articleBody":"### 🔎 Search Terms\n\nTS5033, Could not write file, panic, nil pointer dereference, diagnosticToStringBuilder, incremental, tsbuildinfo, up to date\n\n### 🕗 Version & Regression Information\n\n- This is the behavior in every version I tried: 7.0.2 and 7.1.0-dev.20261019.1, on Windows 11\n\n### 💻 Code\n\n`tsconfig.json`:\n\n```json\n{\n  \"compilerOptions\": {\n    \"incremental\": true,\n    \"declaration\": true,\n    \"rootDir\": \"src\",\n    \"outDir\": \"dist\"\n  }\n}\n```\n\n`src/a.ts` is `export const a = 1;` and `src/b.ts` is `export const b = 2;`. A directory where `a.js` goes makes that one write fail:\n\n```sh\nmkdir -p dist/a.js\ntsc -p .\n```\n\nThen the same project without `\"declaration\": true`:\n\n```sh\nmkdir -p dist/a.js\ntsc -p .\nrmdir dist/a.js\ntsc -b\ntsc -p .\n```\n\n### 🙁 Actual behavior\n\nWith `declaration`, `tsc -p .` and `tsc -b` panic instead of reporting the failed write:\n\n```\npanic: runtime error: invalid memory address or nil pointer dereference [recovered, repanicked]\n...\ngithub.com/microsoft/TypeScript/tsc/internal/ast.(*SourceFile).FileName(...)\n\tgithub.com/microsoft/TypeScript/tsc/internal/ast/ast.go:2629\ngithub.com/microsoft/TypeScript/tsc/internal/execute/incremental.diagnosticToStringBuilder(...)\n\tgithub.com/microsoft/TypeScript/tsc/internal/execute/incremental/snapshot.go:411 +0x109\ngithub.com/microsoft/TypeScript/tsc/internal/execute/incremental.(*snapshot).computeSignatureWithDiagnostics(...)\n\tgithub.com/microsoft/TypeScript/tsc/internal/execute/incremental/snapshot.go:400 +0x11d\ngithub.com/microsoft/TypeScript/tsc/internal/execute/incremental.(*emitFilesHandler).getEmitOptions.func1(...)\n\tgithub.com/microsoft/TypeScript/tsc/internal/execute/incremental/emitfileshandler.go:212 +0x112\n```\n\nWithout `declaration`, the first run reports `error TS5033: Could not write file '…/dist/a.js': open …/dist/a.js: is a directory.`, and once the directory is gone no run writes `dist/a.js`: `tsc -b` exits 0 with \"Project 'tsconfig.json' is up to date because newest input 'src/a.ts' is older than output 'tsconfig.tsbuildinfo'\", and `tsc -p .` exits 1 with the same TS5033 about the removed directory.\n\n### 🙂 Expected behavior\n\nThe run that cannot write `dist/a.js` reports TS5033 and fails, and the next run, with the path writable again, writes `dist/a.js`.\n\n### Additional information about the issue\n\nThe write failure's TS5033 has no file, and [`diagnosticToStringBuilder`](https://github.com/microsoft/TypeScript/blob/5237fd46890956e4bb8177a1a05dcd69e4166560/tsc/internal/execute/incremental/snapshot.go#L405-L411) calls `diagnostic.File().FileName()` whenever the diagnostic's file is not the one being emitted. A write can fail for a reason that passes, such as another process holding the file, so the next run needs to write it again.\n","author":{"url":"https://github.com/YevheniiKotyrlo","@type":"Person","name":"YevheniiKotyrlo"},"datePublished":"2026-10-19T18:08:33Z","url":"https://github.com/microsoft/TypeScript/issues/64875"}

react-profiling0
react-import-mapreact,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-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:5abd6c77-8b93-560f-985b-2043d3f3a275
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idCC6E:17A21E:C79479:102568C:6B063F1E
html-safe-nonced764e6c44727f21dd610b4a9bff844eddc2a92bea604e730918f147d6276a42e
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDQzZFOjE3QTIxRTpDNzk0Nzk6MTAyNTY4Qzo2QjA2M0YxRSIsInZpc2l0b3JfaWQiOiI2NDMyNDYwNTg1NTc3MTAzMTM0IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmac91f219d80db7220c27da27c45ab0794f37e33d18f8b26d47807603db485a9475
hovercard-subject-tagissue:5929024847
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/microsoft/TypeScript/64875/issue_layout
twitter:imagehttps://opengraph.githubassets.com/42ea0f35cdb8d645adcc9807ec0f9fc707e07988d3853beef1ce21e07cd6b52c/microsoft/TypeScript/issues/64875
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/42ea0f35cdb8d645adcc9807ec0f9fc707e07988d3853beef1ce21e07cd6b52c/microsoft/TypeScript/issues/64875
og:image:alt🔎 Search Terms TS5033, Could not write file, panic, nil pointer dereference, diagnosticToStringBuilder, incremental, tsbuildinfo, up to date 🕗 Version & Regression Information This is the behavior ...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameYevheniiKotyrlo
hostnamegithub.com
expected-hostnamegithub.com
Nonedcf72c457c022486d23c3cbb0dd21aba537a87611ca9ddabd1799cf2eaa9b297
turbo-cache-controlno-preview
go-importgithub.com/microsoft/TypeScript git https://github.com/microsoft/TypeScript.git
octolytics-dimension-user_id6154722
octolytics-dimension-user_loginmicrosoft
octolytics-dimension-repository_id20929025
octolytics-dimension-repository_nwomicrosoft/TypeScript
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id20929025
octolytics-dimension-repository_network_root_nwomicrosoft/TypeScript
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release0f38f5735226749ec5e08a8649dce4cb2613d9ad
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/microsoft/TypeScript/issues/64875#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fmicrosoft%2FTypeScript%2Fissues%2F64875
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fmicrosoft%2FTypeScript%2Fissues%2F64875
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=microsoft%2FTypeScript
Reloadhttps://github.com/microsoft/TypeScript/issues/64875
Reloadhttps://github.com/microsoft/TypeScript/issues/64875
Reloadhttps://github.com/microsoft/TypeScript/issues/64875
microsofthttps://github.com/microsoft
TypeScripthttps://github.com/microsoft/TypeScript
Codehttps://github.com/microsoft/TypeScript
Issues5k (5k)https://github.com/microsoft/TypeScript/issues
Pull requests313 (313)https://github.com/microsoft/TypeScript/pulls
Actionshttps://github.com/microsoft/TypeScript/actions
Projectshttps://github.com/microsoft/TypeScript/projects
Wikihttps://github.com/microsoft/TypeScript/wiki
Security and qualityhttps://github.com/microsoft/TypeScript/security
Insightshttps://github.com/microsoft/TypeScript/insights
https://github.com/microsoft/TypeScript
New issuehttps://github.com/login?return_to=https://github.com/microsoft/TypeScript/issues/64875
New issuehttps://github.com/login?return_to=https://github.com/microsoft/TypeScript/issues/64875
#65635https://github.com/microsoft/TypeScript/pull/65635
Incremental compile panics on a failed output write, or never retries ithttps://github.com/microsoft/TypeScript/issues/64875#top
#65635https://github.com/microsoft/TypeScript/pull/65635
Bughttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Bug%22
Crashhttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Crash%22
Domain: tsc: --incrementalhttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Domain%3A%20tsc%3A%20--incremental%22
Backloghttps://github.com/microsoft/TypeScript/milestone/29
https://github.com/YevheniiKotyrlo
YevheniiKotyrlohttps://github.com/YevheniiKotyrlo
on Oct 19, 2026https://github.com/microsoft/TypeScript/issues/64875#issue-5929024847
diagnosticToStringBuilderhttps://github.com/microsoft/TypeScript/blob/5237fd46890956e4bb8177a1a05dcd69e4166560/tsc/internal/execute/incremental/snapshot.go#L405-L411
https://github.com/sunny-kavixo
Putluru Sandeep (sunny-kavixo)https://github.com/sunny-kavixo
on Oct 19, 2026https://github.com/microsoft/TypeScript/issues/64875#issuecomment-6275917842
YevheniiKotyrlohttps://github.com/YevheniiKotyrlo
https://github.com/YevheniiKotyrlo
YevheniiKotyrlohttps://github.com/YevheniiKotyrlo
on Oct 19, 2026https://github.com/microsoft/TypeScript/issues/64875#issuecomment-6277364909
Putluru Sandeep (@sunny-kavixo)https://github.com/sunny-kavixo
https://github.com/sunny-kavixo
Putluru Sandeep (sunny-kavixo)https://github.com/sunny-kavixo
on Oct 19, 2026https://github.com/microsoft/TypeScript/issues/64875#issuecomment-6277558110
YevheniiKotyrlohttps://github.com/YevheniiKotyrlo
https://github.com/sunny-kavixo
Putluru Sandeep (sunny-kavixo)https://github.com/sunny-kavixo
on Oct 20, 2026https://github.com/microsoft/TypeScript/issues/64875#issuecomment-6283506910
YevheniiKotyrlohttps://github.com/YevheniiKotyrlo
#64875https://github.com/microsoft/TypeScript/issues/64875
Ryan Cavanaugh (RyanCavanaugh)https://github.com/RyanCavanaugh
Bughttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Bug%22
Crashhttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Crash%22
on Oct 21, 2026https://github.com/microsoft/TypeScript/issues/64875#event-33871225077
Ryan Cavanaugh (RyanCavanaugh)https://github.com/RyanCavanaugh
Backloghttps://github.com/microsoft/TypeScript/milestone/29
on Oct 21, 2026https://github.com/microsoft/TypeScript/issues/64875#event-33871235346
Ryan Cavanaugh (RyanCavanaugh)https://github.com/RyanCavanaugh
Domain: tsc: --incrementalhttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Domain%3A%20tsc%3A%20--incremental%22
on Oct 21, 2026https://github.com/microsoft/TypeScript/issues/64875#event-33871240717
Sign up for freehttps://github.com/signup?return_to=https://github.com/microsoft/TypeScript/issues/64875
Sign in to commenthttps://github.com/login?return_to=https://github.com/microsoft/TypeScript/issues/64875
Bughttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Bug%22
Crashhttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Crash%22
Domain: tsc: --incrementalhttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Domain%3A%20tsc%3A%20--incremental%22
BacklogNo due datehttps://github.com/microsoft/TypeScript/milestone/29
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Response headers:
Servergithub.com
Content-Typetext/html; charset=utf-8
Cache-Controlmax-age=0, private, must-revalidate

Viewport: width=device-width


URLs of crawlers that visited me.