Skip to content
This repository has been archived by the owner on Aug 31, 2023. It is now read-only.

fix(vscode): add a timeout on the stream reading tasks #3995

Merged
merged 1 commit into from
Dec 6, 2022

Conversation

leops
Copy link
Contributor

@leops leops commented Dec 6, 2022

Summary

This PR fixes a bug in Windows where the stdout and stderr streams of the CLI child process spawned by the extension would never close, making it hang indefinitely on startup. I've modified this logic to use a one second timeout to allow the closing event to be emitted after the child process has exited, after which the code will continue with the buffer content that has been flushed already. I've also included the logging code I've used to debug the issue, as I don't think it's particularly and issue if that's included in the debugging logs of the extension as it may help us figure out more information on this issue in the future.

Test Plan

I've restarted the extension locally a few times until I could reproduce the issue (no stream events other than data being logged) and confirmed the extension was still starting up correctly in this case.

@leops leops requested a review from a team as a code owner December 6, 2022 15:42
@netlify
Copy link

netlify bot commented Dec 6, 2022

Deploy Preview for docs-rometools canceled.

Name Link
🔨 Latest commit dfcdb53
🔍 Latest deploy log https://app.netlify.com/sites/docs-rometools/deploys/638f62ed792cd90008a53a30

@MichaReiser MichaReiser added the A-CLI Area: CLI label Dec 6, 2022
@leops leops merged commit c2705ff into main Dec 6, 2022
@leops leops deleted the fix/vscode-spawn-cli branch December 6, 2022 15:55
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
A-CLI Area: CLI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants