-
Notifications
You must be signed in to change notification settings - Fork 12.5k
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
Delay the calculation of common source root if it would be needed when calculation dts files #59070
Conversation
…n calculation dts files. Also report error if it would be used (declarationDir is specified) just like we do with outDir
@@ -717,31 +717,7 @@ Info seq [hh:mm:ss:mss] event: | |||
"body": { | |||
"triggerFile": "/users/username/projects/project/A/tsconfig.json", | |||
"configFile": "/users/username/projects/project/A/tsconfig.json", | |||
"diagnostics": [ |
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.
This shows how this error was unnecessarily reported when it wont be used as the files are emitted next to source files
"/home/src/projects/project/src/tsconfig.json": jsonToReadableText({ | ||
compilerOptions: { | ||
composite: true, | ||
noEmit: true, |
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.
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
@typescript-bot cherry-pick this to release-5.5 |
…n calculation dts files (#59070)
Hey, @sheetalkamat! I've created #59072 for you. |
…e-5.5 (#59072) Co-authored-by: Sheetal Nandi <[email protected]>
Also report error if it would be used (
declarationDir
is specified) just like we do withoutDir
Fixes #58398 (comment)