Skip to content

Conversation

sheetalkamat
Copy link
Member

Fixes #40136

@typescript-bot typescript-bot added Author: Team For Milestone Bug PRs that fix a bug with a specific milestone labels Oct 23, 2020
{ fileName: libFile.path, isSourceOfProjectReferenceRedirect: false },
{ fileName: file.path, isSourceOfProjectReferenceRedirect: false },
{ fileName: config.path, isSourceOfProjectReferenceRedirect: false },
{ fileName: `${tscWatch.projectRoot}/tsconfig_base.json`, isSourceOfProjectReferenceRedirect: false },
Copy link
Contributor

Choose a reason for hiding this comment

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

Why include it instead of removing it from the response? Are there other cases where TSServer could tell us to expect a file that doesn't actually exist?

Copy link
Contributor

Choose a reason for hiding this comment

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

That is, where we're not expected to then create it? Of course, move to file probably gives a non-existent file path but expects us to go create it - I'm not sure about that though.

Copy link
Member Author

Choose a reason for hiding this comment

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

I am not sure. but i am certain that extendedSourceFiles should contain source file name that wasnt present. It would need another file exists check or another field just to return information if file is present or not and that seems unnecessary just to let project structure information. Let me know if you think its necessary. If it is we would probably need another field on tsconfig source files

Copy link
Member Author

Choose a reason for hiding this comment

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

Copy link
Contributor

Choose a reason for hiding this comment

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

Sorry for the delay.
After further thought, it's probably fine.
If you send VS a file here that doesn't exist, the user will see a somewhat strange diagnostic in the error list complaining that the file doesn't exist, but it won't break or crash.
If we ask for semantic diagnostics for the tsconfig that does exist, will we get one complaining about the missing referenced file?

Copy link
Member Author

Choose a reason for hiding this comment

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

thats correct

@sheetalkamat sheetalkamat merged commit 6bde4b5 into master Oct 29, 2020
@sheetalkamat sheetalkamat deleted the synchronizeProjectList branch October 29, 2020 19:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Author: Team For Milestone Bug PRs that fix a bug with a specific milestone
Projects
None yet
Development

Successfully merging this pull request may close these issues.

synchronizeProjectList returns an entry with an undefined fileName if there is a missing base tsconfig.json
3 participants