Skip to content
This repository has been archived by the owner on Jun 29, 2023. It is now read-only.

--profile value of dioxus serve does not seem to be supplied to all sub-commands that use Cargo profiles #91

Open
d4h0 opened this issue Jan 11, 2023 · 1 comment

Comments

@d4h0
Copy link

d4h0 commented Jan 11, 2023

Hi,

I'm using a separate Cargo profile (see #90), and just noticed that this doesn't seem to work properly.

To debug another issue, I executed cargo clean in my project, after which dioxus serve --profile dev2 fails with:

[INFO] 🚅 Running build command...
[INFO] 👑 Build done.
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: failed reading '/home/user/projects/app/target/wasm32-unknown-unknown/debug/app.wasm'

Caused by:
    No such file or directory (os error 2)', src/builder.rs:124:14
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
[ERROR] 🚫 Serve startup failed: Build Failed: Bindgen build failed!
This is probably due to the Bindgen version, dioxus-cli using `0.2.81` Bindgen crate.

(Notice the debug in the path after failed reading)

Next, to test if my profile (which just inherits everything from the dev profile) is the problem, I executed dioxus serve (i.e., no custom profile), which worked.

After that, I executed dioxus serve --profile dev2 again, which now works.

My guess is, that dioxus serve --profile dev2 executes more than one command that uses Cargo profiles, but does not supply the custom profile to every of those commands.

@d4h0
Copy link
Author

d4h0 commented Jan 11, 2023

The result seems to be that hot-reloading does not work at all (if a custom profile is used). At least, no change I make to my code results in a change to the content that is served to the browser.

Btw., I've installed the CLI from master.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant