Skip to content

dx serve --hotpatch fails with build error Missing rustc args for replay #5540

@rami3l

Description

@rami3l

Problem

Upstreamed from Pangpang-Studio/monoxide#158.

Our workspace setup worked last month when we were using Dioxus CLI 0.7.4, so some regression must have happened since then.

When trying to trigger a --hotpatch reloading dx serve in the playground "example" binary target of the workspace, subsecond's DAG scan somehow thinks that the root binary target also needs to be rebuilt.

However, playground doesn't rely on the root binary target at all so it wasn't built. Thus, when dx is trying to replay the build, this will give a [dev] Build failed: Missing rustc args for replay error.

Manually rebuilding with r works, but this is against the point of enabling --hotpatch.

Expected behavior

The workspace reloads correctly.

Actual behavior

We see verbose error logs like so:

[dev] Verbose logging is now on 
[dev] Patch rebuild: changed_crates=["monoxide_font"], modified_crates={"monoxide_font", "playground", "monoxide"} 
[dev] Changed crates dag using {"monoxide_font", "playground", "monoxide"} 
[dev] replaying crates: ["monoxide_font", "monoxide"] 
[dev] Setting builder to failed state 
[dev] Build failed: Missing rustc args for replay: 'monoxide' 

... and the hotpatch never succeeded.

Steps To Reproduce

To make the investigation simpler, I have made a minimal reproduction that mirrors the basic structure of our project monoxide under the repros/issue-158-hmr subdirectory.

Environment:

  • Dioxus version: 0.7.9
  • Rust version: 1.95.0 stable
  • OS info: macOS 26.4.1
  • App platform: subsecond-only, not using Dioxus

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions