Cache resolved project references and watch wild card directories from them to update them#42929
Merged
sheetalkamat merged 23 commits intomasterfrom Mar 26, 2021
Merged
Cache resolved project references and watch wild card directories from them to update them#42929sheetalkamat merged 23 commits intomasterfrom
sheetalkamat merged 23 commits intomasterfrom
Conversation
…r projects so that its shared
a37acc6 to
a2ffcc2
Compare
a2ffcc2 to
06ed30b
Compare
Member
Author
|
@typescript-bot pack this |
Collaborator
|
Heya @sheetalkamat, I've started to run the tarball bundle task on this PR at a8195ad. You can monitor the build here. |
Collaborator
|
Hey @sheetalkamat, I've packed this into an installable tgz. You can install it for testing by referencing it in your and then running There is also a playground for this build and an npm module you can use via |
RyanCavanaugh
approved these changes
Mar 26, 2021
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.
When creating program, we have two methods to get resolved project reference. Through
CompilerHost.getParsedCommandLineor gettinghost.getSourceFileand using tsconfig parsing on that source file. Previously onlytsc -busedgetParsedCommandLinethat cached the command lines for the projects. With this changetsserveras well astsc -wset those methods onCompilerHost.The change involves:
ParsedCommandLinesif they are not needed in new program just like we release source files. This is to enable handling and releasing of the parsed command lines between multiple programs that is used bytsserverandtsc -wisIgnoredFileFromWildCardWatchingcan take root file names so it can ignore the output file names for those and ignore them.tsc -wandtsserverscenario, we cache theParsedCommandLinefor the referenced projects and its invalidated only if there is change in config file, change in extended files or new files are added or removedgetParsedCommandLineonLanguageServiceHostif present or get source file and parses the command line (just like it would have been done byprogrambefore this change)Fixes #37304
Probably fixes #42607