Skip to content

Error: Debug Failure. False expression: Semantic diagnostics shouldnt be available for changed files #50222

Closed
@MarcCelani-at

Description

@MarcCelani-at

Bug Report

I was testing the correctness of watch mode in TypeScript 4.7.4 with a patch applied (see #7317, which I am using on top of 4.7.4 until I move to 4.8 which has #48997) when I came across this crash.

The test was performed on a large mono repo. I would checkout two branches that had hundreds of commits in between each other (some of which updated package.json), but both were on the same version of TypeScript. After completing a checkout, I would run yarn install.

This is the crash:

[12:10:24 PM] File change detected. Starting incremental compilation...

.../node_modules/.store/typescript-patch-7583448d64/node_modules/typescript/lib/tsc.js:2099
            throw e;
            ^

Error: Debug Failure. False expression: Semantic diagnostics shouldnt be available for changed files
    at createBuilderProgramState (.../node_modules/.store/typescript-patch-7583448d64/node_modules/typescript/lib/tsc.js:99177:26)
    at Object.createBuilderProgram (.../node_modules/.store/typescript-patch-7583448d64/node_modules/typescript/lib/tsc.js:99738:21)
    at createEmitAndSemanticDiagnosticsBuilderProgram (.../node_modules/.store/typescript-patch-7583448d64/node_modules/typescript/lib/tsc.js:100051:19)
    at Object.host.createProgram (.../node_modules/.store/typescript-patch-7583448d64/node_modules/typescript/lib/tsc.js:104732:20)
    at createProgram (.../node_modules/.store/typescript-patch-7583448d64/node_modules/typescript/lib/tsc.js:103181:28)
    at executeSteps (.../node_modules/.store/typescript-patch-7583448d64/node_modules/typescript/lib/tsc.js:103330:25)
    at Object.done (.../node_modules/.store/typescript-patch-7583448d64/node_modules/typescript/lib/tsc.js:103150:13)
    at Timeout.buildNextInvalidatedProject [as _onTimeout] (.../node_modules/.store/typescript-patch-7583448d64/node_modules/typescript/lib/tsc.js:103873:32)

🔎 Search Terms

semantic diagnostics shouldnt be available for changed files

🕗 Version & Regression Information

4.7.4 with patch applied (see bug description above)

  • This is a crash
  • I was unable to test this on prior versions because watch mode has been undergoing a lot of changes, I'm not sure how relevant it would be.

🙁 Actual behavior

Crash with Semantic diagnostics shouldnt be available for changed files

🙂 Expected behavior

No crash, settle down and eventually typescript completely passes without needing to restart typescript

Metadata

Metadata

Assignees

Labels

Needs More InfoThe issue still hasn't been fully clarifiedRescheduledThis issue was previously scheduled to an earlier milestone

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions