Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
MarcCelani-at opened this issue Aug 8, 2022 · 1 comment
Assignees
Labels
Needs More Info The issue still hasn't been fully clarified Rescheduled This issue was previously scheduled to an earlier milestone

Comments

@MarcCelani-at
Copy link

MarcCelani-at commented Aug 8, 2022

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

@RyanCavanaugh RyanCavanaugh added the Needs Investigation This issue needs a team member to investigate its status. label Aug 8, 2022
@RyanCavanaugh RyanCavanaugh added this to the TypeScript 4.9.0 milestone Aug 8, 2022
@sheetalkamat
Copy link
Member

Is this still repoing.. if yes we would need repro steps (preferably) otherwise extendedDiagnostics logs that you can send us and based on that we would need to see how to take this forward.. Its completely based on state so its not easy to figure out why should get that assert just by looking at code.

@sheetalkamat sheetalkamat added the Needs More Info The issue still hasn't been fully clarified label Sep 23, 2022
@sheetalkamat sheetalkamat removed the Needs Investigation This issue needs a team member to investigate its status. label Sep 23, 2022
@RyanCavanaugh RyanCavanaugh added the Rescheduled This issue was previously scheduled to an earlier milestone label Feb 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs More Info The issue still hasn't been fully clarified Rescheduled This issue was previously scheduled to an earlier milestone
Projects
None yet
Development

No branches or pull requests

3 participants