Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(cli): Windows stdin handle waits in an infinite loop #7077

Merged
merged 2 commits into from Mar 14, 2023

Conversation

realtimetodie
Copy link
Contributor

Prevents the stdin handle from waiting in an infinite loop for the read stream to finish, when running in a process with a detached console on Windows.

This is a known issue on Windows. To prevent this from happening, this change simply flips the order how inputs are parsed. Now, the files option is used first before using the stdin input as a fallback.

As a workaround in Bazel rules_swc, we forward the output of the null device to force the read stream to immediately finish on Windows. However, this workaround appears to cause a difference in argv quoting.

https://github.com/aspect-build/rules_swc/blob/e149dd5fc9e512d5b87b3d52a5aa8422c1a1a309/swc/private/swc.bzl#L194

Related

@kdy1 kdy1 requested a review from kwonoj March 14, 2023 00:37
Copy link
Member

@kdy1 kdy1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

swc-bump:

  • dbg-swc

@kdy1 kdy1 enabled auto-merge (squash) March 14, 2023 03:02
Copy link
Collaborator

@swc-bot swc-bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Automated review comment generated by auto-rebase script

@kdy1 kdy1 merged commit 7bbec92 into swc-project:main Mar 14, 2023
@kdy1 kdy1 modified the milestones: Planned, v1.3.41 Mar 17, 2023
alexeagle pushed a commit to realtimetodie/rules_swc that referenced this pull request Mar 20, 2023
alexeagle pushed a commit to aspect-build/rules_swc that referenced this pull request Mar 20, 2023
@swc-project swc-project locked as resolved and limited conversation to collaborators Apr 16, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants