[Repo Assist] fix: always close stdin in format() regardless of debug mode#92
Draft
github-actions[bot] wants to merge 1 commit intomasterfrom
Draft
Conversation
When phpcbf.debug is true, exec.stdin was left open, causing the spawned phpcbf process to block waiting for stdin input. This manifests as the onWillSaveTextDocument timeout error (issue #35) when debug mode is enabled. phpcbf operates on a temp file passed as an argument, never on stdin, so stdin should always be closed immediately after spawn. Closes #35 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
33 tasks
This comment has been minimized.
This comment has been minimized.
Contributor
Author
|
🤖 This is an automated note from Repo Assist. This PR appears to be a duplicate of PR #90 ("[Repo Assist] fix: always close stdin in format() regardless of debug mode (closes #35)"), which covers the same change with a more complete description referencing the issue it closes. I'd recommend closing this PR and tracking the fix via PR #90 instead.
|
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.
🤖 This PR was created by Repo Assist, an automated AI assistant.
Summary
When
phpcbf.debugistrue,exec.stdinwas left open after spawning the phpcbf process. This caused phpcbf to block waiting for stdin input, which manifested as theonWillSaveTextDocument-listener threw ERROR: timeoutseen in issue #35.phpcbf always operates on a temp file passed as a CLI argument — it never reads from stdin — so stdin should be closed immediately after spawn regardless of the debug setting.
Root Cause
Fix
Closes #35