Skip to content

Conversation

@sheetalkamat
Copy link
Member

Fixes #50959

@typescript-bot typescript-bot added Author: Team For Uncommitted Bug PR for untriaged, rejected, closed or missing bug labels Sep 27, 2022
if (buildInfo.program) {
// If there are pending changes that are not emitted, project is out of date
// If noEmit, then explicitly check if there are semantic diagnostics
// affectedFilesPendingEmit is present in noEmit irrespective of errors to handle files to be emitted when noEmit is false,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This helps me understand why affectedFilesPendingEmit behaves differently under noEmit, but I don’t understand why that makes checking for the presence of semantic errors the correct fallback. Why does the presence of semantic errors definitely mean the buildinfo is out of date? Why isn’t the same true of syntactic errors?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If program has syntactic errors the changeFileSet because semantic diagnostics are not even processed in that case and state remains same. (https://github.com/microsoft/TypeScript/pull/50974/files#diff-2461280d51916bf4023650d8950c0af3bf16011e3f0c8a290c7c9f70056147a0R77) I will update the comment

@sheetalkamat sheetalkamat merged commit 16faef1 into main Sep 27, 2022
@sheetalkamat sheetalkamat deleted the reBuildNoEmitErrors branch September 27, 2022 22:57
@glasser
Copy link

glasser commented Oct 11, 2022

Do we know when this fix will be released? Looks like it didn't quite make it into 4.8.4. We are stuck on 4.7 until it's out.

@microsoft microsoft locked as resolved and limited conversation to collaborators Oct 22, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Author: Team For Uncommitted Bug PR for untriaged, rejected, closed or missing bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4.8 regression with tsc --build: error correctly reported, then another execution succeeds

5 participants