Skip to content

Pull out parts of TI Adapter so we can test that more correctly instead of having to copy things#56387

Merged
sheetalkamat merged 1 commit into
mainfrom
moreTiTesting
Nov 14, 2023
Merged

Pull out parts of TI Adapter so we can test that more correctly instead of having to copy things#56387
sheetalkamat merged 1 commit into
mainfrom
moreTiTesting

Conversation

@sheetalkamat

Copy link
Copy Markdown
Member

This found another issue where in closing project which doesnt use TI, initialized typing installer just to do nothing

…of having to copy things

This found another issue where in closing project which doesnt use TI, initialized typing installer just to do nothing
@typescript-bot typescript-bot added Author: Team For Uncommitted Bug PR for untriaged, rejected, closed or missing bug labels Nov 14, 2023
onProjectClosed(project: Project) {
this.perProjectCache.delete(project.getProjectName());
this.installer.onProjectClosed(project);
if (this.perProjectCache.delete(project.getProjectName())) {

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

This is the fix for unnecessary queueing of closeProject request

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Eg tests in unittests\tsserver\autoImportProvider would fail by showing creating TI when the project is closed that does not enable TI

this.installer.send(rq);
}

enqueueInstallTypingsRequest(project: Project, typeAcquisition: TypeAcquisition, unresolvedImports: SortedReadonlyArray<string>): void {

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

All of this moved to adapter

},
"unresolvedImports": [],
"projectRootPath": "/node_modules/@angular/forms",
"cachePath": "/a/data",

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

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)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Author: Team For Uncommitted Bug PR for untriaged, rejected, closed or missing bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants