fix(cli): prevent dx build stall on macOS arm64 with Tailwind#5382
Open
BillionClaw wants to merge 1 commit intoDioxusLabs:mainfrom
Open
fix(cli): prevent dx build stall on macOS arm64 with Tailwind#5382BillionClaw wants to merge 1 commit intoDioxusLabs:mainfrom
BillionClaw wants to merge 1 commit intoDioxusLabs:mainfrom
Conversation
Fix issue DioxusLabs#5369 where dx build and dx serve would stall on macOS arm64 when automatic Tailwind integration is enabled. The Tailwind v4 watch mode process blocks waiting for stdin on macOS arm64. The original code dropped stdin after proc.wait(), causing a deadlock: - wait() waits for process exit - Process waits for stdin to close - stdin never gets closed because wait() never returns Fix by dropping stdin BEFORE calling wait(): drop(proc.stdin.take()); proc.wait().await?; Added regression tests to prevent future issues.
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.
Summary
Fixes #5369 -
dx buildanddx servewould stall on macOS arm64 when automatic Tailwind integration is enabled.Root Cause
In
TailwindCli::serve(), the Tailwind v4 process was spawned with piped stdin. On macOS arm64, the Tailwind process in watch mode blocks waiting for stdin. The original code:This caused a deadlock because
wait()waits for the process to exit, but the Tailwind process waits for stdin to close. Since stdin was only dropped afterwait()returned, neither could proceed.Fix
Drop stdin BEFORE calling
wait():Testing
Added unit tests to verify the autodetect logic and document the fix.
Fixes #5369