-
-
Notifications
You must be signed in to change notification settings - Fork 431
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
Fix missing error output in root project with project references #937
Fix missing error output in root project with project references #937
Conversation
@@ -187,13 +187,14 @@ function provideErrorsToWebpack( | |||
? constants.dtsTsTsxJsJsxRegex | |||
: constants.dtsTsTsxRegex; | |||
|
|||
// I’m pretty sure this will never be undefined here | |||
const program = ensureProgram(instance); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I trust you dude 😁
? [ | ||
...languageService!.getSyntacticDiagnostics(filePath), | ||
...languageService!.getSemanticDiagnostics(filePath) | ||
] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just out of curiosity, can you recall why we used to alternate between languageService
and program
here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To clarify, these lines weren't the issue, I just updated them for consistency with the changes above, which were the issue.
languageService.get*Diagnostics()
essentially just calls its internal program.get*Diagnostics()
. Based on loader options (and I honestly can't remember what options produce what scenarios), we either have a program directly (instance.program
) or a language service which has a program under the hood (instance.languageService.getProgram()
). Before, we were branching here in this function based on where the underlying program is. But, we already have a util—ensureProgram
—that does that branching.
TL;DR: these lines are basically equivalent because of ensureProgram
; the lines above should have been looking at both program
and languageService
but were only looking at program
.
I'm about to head to bed - the UK has come last in the Eurovision song contest. Clearly I am shellshocked 🙄🙈🙉 Feel free to merge when you're ready. 😀 If you wanted to push out the release you're welcome to; it's simple, just:
|
Fixes #932