Uh oh!
There was an error while loading. Please reload this page.
Added affectsSourceFile to importHelpers and jsxImportSource - #59195
Conversation
Sheetal Nandi (sheetalkamat)
left a comment
There was a problem hiding this comment.
This is good but test case would be better
Is this due to #58654? Does the change need to be cherry-picked to |
Andrew Branch (andrewbranch)
commented
Jul 9, 2024
The inconsistency was always there, but the debug assert is new in #58451, so yes, a cherry-pick would be good |
Gabriela Araujo Britto (gabritto)
commented
Jul 9, 2024
Adding to what Andrew said, #58654 makes us call the function with the failed assertion for potentially every file in a project instead of once per checker. |
Andrew Branch (andrewbranch)
commented
Jul 9, 2024
Also FWIW, the reason we're not seeing user reports about this is you need a project references scenario where two projects contain the same source file and differ in compiler options only in |
Sheetal Nandi (sheetalkamat)
left a comment
There was a problem hiding this comment.
Pls fix formatting
Andrew Branch (andrewbranch)
commented
Jul 10, 2024
TypeScript Bot (@typescript-bot) cherry-pick to release-5.5 |
TypeScript Bot (typescript-bot)
commented
Jul 10, 2024
Hey, Andrew Branch (@andrewbranch)! I've created #59231 for you. |
…e-5.5 (#59231) Co-authored-by: Armando Aguirre <armando.aguirre@microsoft.com>
Fixes#59168 (comment)
The issue happens in a project containing nested projects. One of them defines
"importHelpers": true, while the root config doesn't.In this scenario, depending on the order the files are opened an incorrect checker is used causing to hit the assert:
Debug Failure. False expression: Expected sourceFile.imports[0] to be the synthesized tslib import.