Cherry picking #33145 to release-3.6 #33170
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Handle seenEmittedFiles which was not being set when emit of a file was complete (#33145)
Add test that fails because file is written multiple times
Reported from Prevent excessive compilation of files within a cycle #33061
Handle seenEmittedFiles which was not being set when emit of a file was complete.
It was issue only when errors are reported before emitting (which puts the files into pendingEmit that needs to check only in seenEmittedFiles)
If emit happens before semantic diagnostics query this issue is not repro, because the affected files come into play and those are being set correctly
Fixes tsc instance reuse in composite project causes out of memory crash #31398
make baselining source map optional
Handle emitDeclarationOnly in --build scenario
Ensure we are using d.ts emit as signature even when --declarationMap is on (map files are emitted before d.ts)
Move module specifiers to verifyTsBuildOutput
implement create Hash to be default hashing plus data so we can verify it easily in baseline
Remove failing baseline
Accept correct baseline name