Fix global plugin search paths, fixes #62618#62619
Fix global plugin search paths, fixes #62618#62619benjamind wants to merge 1 commit intomicrosoft:mainfrom
Conversation
The global plugin search path was resolving to "X/node_modules/node_modules" due to incorrect number of updirs in the initial path.
|
This PR doesn't have any linked issues. Please open an issue that references this PR. From there we can discuss and prioritise. |
1 similar comment
|
This PR doesn't have any linked issues. Please open an issue that references this PR. From there we can discuss and prioritise. |
There was a problem hiding this comment.
Pull Request Overview
This PR fixes an incorrect global plugin search path that was resolving to "X/node_modules/node_modules" instead of the intended location. The fix corrects the number of parent directory traversals when computing the plugin search path from the TypeScript server executable location.
Key Changes:
- Updated the path traversal from "../../../" to "../../../../" to correctly walk from the tsserver.js location to the appropriate directory
- Enhanced code comments to clarify the intended path resolution behavior
| ...this.projectService.pluginProbeLocations, | ||
| // ../../.. to walk from X/node_modules/typescript/lib/tsserver.js to X/node_modules/ | ||
| combinePaths(this.projectService.getExecutingFilePath(), "../../.."), | ||
| // ../../.. to walk from X/node_modules/typescript/lib/tsserver.js to X/ |
There was a problem hiding this comment.
The comment mentions '../../..' (3 updirs) but the code now uses '../../../..' (4 updirs). The comment should be updated to match the actual number of updirs used in the code below.
| // ../../.. to walk from X/node_modules/typescript/lib/tsserver.js to X/ | |
| // ../../../.. to walk from X/node_modules/typescript/lib/tsserver.js to X/ |
|
With 6.0 out as the final release vehicle for this codebase, we're closing all PRs that don't fit the merge criteria for post-6.0 patches. If you think this was a mistake and this PR fits the post-6.0 patch criteria, please post to the 6.0 iteration issue with details (specifically, which PR and which patch criteria it satisfies). Next steps for PRs:
|
The global plugin search path was resolving to "X/node_modules/node_modules" due to incorrect number of updirs in the initial path.
Fixes #