Fix #305740: avoid sync subprocess wait in TS node path resolution#305752
Open
rupeshkumar-555 wants to merge 4 commits intomicrosoft:mainfrom
Open
Fix #305740: avoid sync subprocess wait in TS node path resolution#305752rupeshkumar-555 wants to merge 4 commits intomicrosoft:mainfrom
rupeshkumar-555 wants to merge 4 commits intomicrosoft:mainfrom
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR addresses host responsiveness issues in the TypeScript extension by removing synchronous subprocess probing (execFileSync) from Node path detection and replacing it with PATH-based executable resolution.
Changes:
- Added
resolveNodeExecutableFromPathto resolvenodeviaPATH/PATHEXTinstead of running a subprocess. - Updated
findNodePathto use the new resolver and keep the existing warning behavior when Node cannot be detected. - Added unit tests covering PATH resolution on win32 and non-win32.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| extensions/typescript-language-features/src/configuration/configuration.electron.ts | Replaces sync subprocess detection with PATH-based resolution helper used by Node path detection. |
| extensions/typescript-language-features/src/test/unit/configuration.electron.test.ts | Adds unit coverage for the new PATH-based Node resolution behavior. |
extensions/typescript-language-features/src/configuration/configuration.electron.ts
Show resolved
Hide resolved
extensions/typescript-language-features/src/configuration/configuration.electron.ts
Outdated
Show resolved
Hide resolved
Author
|
@microsoft-github-policy-service agree |
9ef3f05 to
22ff881
Compare
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Problem
Issue #305740 reports host unresponsiveness when a subprocess wait blocks an event-loop owned path.
In TypeScript extension configuration, resolving the user-configured node path used a synchronous subprocess call:
Even with a timeout, this can still block the extension host event loop during stalls and degrade responsiveness.
Fix
Replaced synchronous subprocess probing with direct PATH-based executable resolution:
This keeps node path resolution fully non-blocking from the event-loop perspective.
Tests
Fixes #305740