-
Notifications
You must be signed in to change notification settings - Fork 13k
Closed
Copy link
Labels
BugA bug in TypeScriptA bug in TypeScript
Milestone
Description
TypeScript Version:
3.7.0-dev.20191018
Search Terms:
tsserver plugin pluginProbeLocations
Code
TypeScript/src/server/project.ts
Lines 1362 to 1364 in 1d3ecc0
// Search our peer node_modules, then any globally-specified probe paths | |
// ../../.. to walk from X/node_modules/typescript/lib/tsserver.js to X/node_modules/ | |
const searchPaths = [combinePaths(this.projectService.getExecutingFilePath(), "../../.."), ...this.projectService.pluginProbeLocations]; |
Expected behavior:
If pluginProbeLocations
are provided, tsserver should always prioritize that, and use peer node_modules as fallback.
Actual behavior:
pluginProbeLocations
has no effect if tsserver finds the module in peer node_modules.
From tsserver logs:
In this case, pluginProbeLocations=/Users/aioiyuuko/.vscode/extensions/angular.ng-template-0.900.0-next.2/server/node_modules/@angular/language-service
However, the path is not respected, and instead the plugin was loaded from peer node_module.
Info 9 [9:31:48.985] Enabling plugin @angular/language-service from candidate paths: /Users/aioiyuuko/workspaces/pxn/anduin/node_modules/typescript/lib/tsserverlibrary.js/../../..,/Users/aioiyuuko/.vscode/extensions/angular.ng-template-0.900.0-next.2/server/node_modules/@angular/language-service
Info 10 [9:31:48.985] Loading @angular/language-service from /Users/aioiyuuko/workspaces/pxn/anduin/node_modules/typescript/lib/tsserverlibrary.js/../../.. (resolved to /Users/aioiyuuko/workspaces/pxn/anduin/node_modules/node_modules)
Info 11 [9:31:49.111] Plugin validation succeded
Metadata
Metadata
Assignees
Labels
BugA bug in TypeScriptA bug in TypeScript