Pull out parts of TI Adapter so we can test that more correctly instead of having to copy things#56387
Merged
Conversation
…of having to copy things This found another issue where in closing project which doesnt use TI, initialized typing installer just to do nothing
sheetalkamat
commented
Nov 14, 2023
| onProjectClosed(project: Project) { | ||
| this.perProjectCache.delete(project.getProjectName()); | ||
| this.installer.onProjectClosed(project); | ||
| if (this.perProjectCache.delete(project.getProjectName())) { |
Member
Author
There was a problem hiding this comment.
This is the fix for unnecessary queueing of closeProject request
Member
Author
There was a problem hiding this comment.
Eg tests in unittests\tsserver\autoImportProvider would fail by showing creating TI when the project is closed that does not enable TI
sheetalkamat
commented
Nov 14, 2023
| this.installer.send(rq); | ||
| } | ||
|
|
||
| enqueueInstallTypingsRequest(project: Project, typeAcquisition: TypeAcquisition, unresolvedImports: SortedReadonlyArray<string>): void { |
Member
Author
There was a problem hiding this comment.
All of this moved to adapter
sheetalkamat
commented
Nov 14, 2023
| }, | ||
| "unresolvedImports": [], | ||
| "projectRootPath": "/node_modules/@angular/forms", | ||
| "cachePath": "/a/data", |
Member
Author
There was a problem hiding this comment.
Removes unnecessary addition of cachePath that was done by test typing installer. (its same as globalcache path that will be processed at the initialization and was not set by node typings installer as well)
jakebailey
approved these changes
Nov 14, 2023
This was referenced Nov 15, 2023
Merged
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.
This found another issue where in closing project which doesnt use TI, initialized typing installer just to do nothing