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

Rebuilds fail on Windows in fullstack projects #3262

Closed
Hamcha opened this issue Nov 29, 2024 · 2 comments
Closed

Rebuilds fail on Windows in fullstack projects #3262

Hamcha opened this issue Nov 29, 2024 · 2 comments

Comments

@Hamcha
Copy link

Hamcha commented Nov 29, 2024

Problem

dx serve fails to rebuild the project on Windows specifically when the change is not hot-reloadable. Hot-reload works just fine.
On my linux setup, none of this happens and everything works just fine.

Every time a new build is triggered, whether by the watcher or manually by pressing R key, a step will fail like this:

19:17:32 [dev] Running wasm-bindgen
19:17:33 [dev] wasm-bindgen complete in 1.879154s
19:17:33 [dev] Copying server executable to: "C:\projects\repro-test\target\dx\repro-test\debug\web\server.exe" Bu exe: "C:\projects\repro-test\target\dioxus-server\repro-test.exe",
assets: AssetManifest {
assets: {},
},
time_taken: 3.5184063s,
}
19:17:33 [dev] Setting builder to failed state
19:17:34 [dev] Build failed: IO(Os { code: 32, kind: Uncategorized, message: "The process cannot access the file because it is being used by another process." })

Full rebuild log with verbose logging enabled
19:17:28 [dev] Full rebuild: triggered manually
19:17:28 [dev] Running build command...
19:17:28 [dev] Building app...
19:17:28 [dev] Executing cargo...
19:17:28 [dev] cargo args: ["--profile", "dioxus-wasm", "--target", "wasm32-unknown-unknown", "--verbose", "--features", "web", "--bin", "repro-test"]
19:17:28 [dev] Building server...
19:17:28 [dev] Building app...
19:17:28 [dev] Executing cargo...
19:17:28 [dev] cargo args: ["--profile", "dioxus-server", "--verbose", "--features", "server", "--bin", "repro-test"]
19:17:28 [dev] cargo args: ["--profile", "dioxus-wasm", "--target", "wasm32-unknown-unknown", "--verbose", "--features", "web", "--bin", "repro-test"]
19:17:28 [dev] cargo args: ["--profile", "dioxus-server", "--verbose", "--features", "server", "--bin", "repro-test"]
19:17:30 [dev] Build completed successfully - output location: "C:\\projects\\repro-test\\target\\wasm32-unknown-unknown\\dioxus-wasm\\repro-test.wasm"
19:17:30 [dev] Collecting assets ...
19:17:30 [dev] cargo args: ["--profile", "dioxus-wasm", "--target", "wasm32-unknown-unknown", "--verbose", "--features", "web", "--bin", "repro-test"]
19:17:31 [dev] Build completed successfully - output location: "C:\\projects\\repro-test\\target\\dioxus-server\\repro-test.exe"
19:17:31 [dev] Collecting assets ...
19:17:31 [dev] cargo args: ["--profile", "dioxus-server", "--verbose", "--features", "server", "--bin", "repro-test"]
19:17:32 [dev] Assembling app bundle
19:17:32 [dev] Running wasm-bindgen
19:17:33 [dev] wasm-bindgen complete in 1.879154s
19:17:33 [dev] Copying server executable to: "C:\\projects\\repro-test\\target\\dx\\repro-test\\debug\\web\\server.exe" Bu    exe: "C:\\projects\\repro-test\\target\\dioxus-server\\repro-test.exe",
    assets: AssetManifest {
        assets: {},
    },
    time_taken: 3.5184063s,
}
19:17:33 [dev] Setting builder to failed state
19:17:34 [dev] Build failed: IO(Os { code: 32, kind: Uncategorized, message: "The process cannot access the file because it is being used by another process." })

I have compiled the smallest amount of code that triggers this (mostly a stripped down template): https://github.com/Hamcha/repro-test

Steps To Reproduce

Steps to reproduce the behavior:

  • Create a full-stack project
  • Start dx serve
  • Make any non hot-reloadable change or just press the R key

Expected behavior

Just like on Linux, a rebuild should work.

Environment:

  • Dioxus version: v0.6.0-alpha.5
  • Rust version: rustc 1.83.0 (90b35a623 2024-11-26)
  • OS info: Windows 10 22H2
  • App platform: fullstack

Questionnaire

I'm interested in fixing this myself but don't know where to start

@DogeDark
Copy link
Member

This should be fixed in #3239. Can you test the Git version of the CLI?

cargo install --git https://github.com/DioxusLabs/dioxus dioxus-cli

@Hamcha
Copy link
Author

Hamcha commented Nov 29, 2024

Yup it works! Thank you very much!

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

No branches or pull requests

2 participants