Skip to content
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

Merged
merged 2 commits into from
Jun 28, 2024

Conversation

sheetalkamat
Copy link
Member

@sheetalkamat sheetalkamat commented Jun 28, 2024

Also report error if it would be used (declarationDir is specified) just like we do with outDir

Fixes #58398 (comment)

…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": [
Copy link
Member Author

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,
Copy link
Member Author

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

@sheetalkamat sheetalkamat merged commit 6c68fdd into main Jun 28, 2024
29 checks passed
@sheetalkamat sheetalkamat deleted the lazyDiagnosticsIssue branch June 28, 2024 21:29
@sheetalkamat
Copy link
Member Author

@typescript-bot cherry-pick this to release-5.5

@typescript-bot
Copy link
Collaborator

typescript-bot commented Jun 28, 2024

Starting jobs; this comment will be updated as builds start and complete.

Command Status Results
cherry-pick this to release-5.5 ✅ Started ✅ Results

@typescript-bot
Copy link
Collaborator

Hey, @sheetalkamat! I've created #59072 for you.

@sheetalkamat sheetalkamat added this to the TypeScript 5.5.4 milestone Jul 10, 2024
DanielRosenwasser pushed a commit that referenced this pull request Jul 17, 2024
…e-5.5 (#59072)

Co-authored-by: Sheetal Nandi <shkamat@microsoft.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Author: Team For Uncommitted Bug PR for untriaged, rejected, closed or missing bug
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants