Delay the calculation of common source root if it would be needed when calculation dts files#59070
Merged
sheetalkamat merged 2 commits intomainfrom Jun 28, 2024
Merged
Delay the calculation of common source root if it would be needed when calculation dts files#59070sheetalkamat merged 2 commits intomainfrom
sheetalkamat merged 2 commits intomainfrom
Conversation
…n calculation dts files. Also report error if it would be used (declarationDir is specified) just like we do with outDir
sheetalkamat
commented
Jun 28, 2024
| "body": { | ||
| "triggerFile": "/users/username/projects/project/A/tsconfig.json", | ||
| "configFile": "/users/username/projects/project/A/tsconfig.json", | ||
| "diagnostics": [ |
Member
Author
There was a problem hiding this comment.
This shows how this error was unnecessarily reported when it wont be used as the files are emitted next to source files
sheetalkamat
commented
Jun 28, 2024
| "/home/src/projects/project/src/tsconfig.json": jsonToReadableText({ | ||
| compilerOptions: { | ||
| composite: true, | ||
| noEmit: true, |
Member
Author
There was a problem hiding this comment.
We use to calculate common source dir and report error if OutDir, rootDir, mapRoot or sourceRoot were specified or files would be emitted. So if you had noEmit we wouldnt cache this and then when getting dts diagnostics it would crash because it was over eager (or didnt cache for declarationDir
jakebailey
approved these changes
Jun 28, 2024
Member
Author
|
@typescript-bot cherry-pick this to release-5.5 |
Collaborator
typescript-bot
pushed a commit
that referenced
this pull request
Jun 28, 2024
…n calculation dts files (#59070)
Collaborator
|
Hey, @sheetalkamat! I've created #59072 for you. |
DanielRosenwasser
pushed a commit
that referenced
this pull request
Jul 17, 2024
…e-5.5 (#59072) Co-authored-by: Sheetal Nandi <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Also report error if it would be used (
declarationDiris specified) just like we do withoutDirFixes #58398 (comment)