Skip to content

fix(cli): prevent dx build stall on macOS arm64 with Tailwind#5382

Open
BillionClaw wants to merge 1 commit intoDioxusLabs:mainfrom
BillionClaw:clawoss/fix/5369-macos-arm64-tailwind-stall
Open

fix(cli): prevent dx build stall on macOS arm64 with Tailwind#5382
BillionClaw wants to merge 1 commit intoDioxusLabs:mainfrom
BillionClaw:clawoss/fix/5369-macos-arm64-tailwind-stall

Conversation

@BillionClaw
Copy link
Contributor

Summary

Fixes #5369 - dx build and dx serve would 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:

let stdin = proc.stdin.take();
proc.wait().await?;
drop(stdin);

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 after wait() returned, neither could proceed.

Fix

Drop stdin BEFORE calling wait():

drop(proc.stdin.take());
proc.wait().await?;

Testing

Added unit tests to verify the autodetect logic and document the fix.

Fixes #5369

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.
@BillionClaw BillionClaw requested a review from a team as a code owner March 17, 2026 15:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

dx build / dx serve can stall on macOS arm64 when automatic Tailwind is enabled

1 participant