Skip to content

Conversation

@newfla
Copy link

@newfla newfla commented Nov 9, 2025

Summary:
Avoid panicking when searching default members in a current directory different from the main workspace folder.
Unfortunately #4895 was not targeting the actual issue of #4873.

Details:
Basically it avoid panicking on line 309.
Unwrapping on 322 should be fine but for code style consistency I've also edited it.

Fix #4873

@newfla newfla requested a review from a team as a code owner November 9, 2025 16:26
@ealmloff
Copy link
Member

Avoid panicking when searching default members in a current directory different from the main workspace folder.

We shouldn't be unwrapping in case the Cargo.toml is wrong, but I don't think that is the main issue here. Looking at your reproduction again, the original PR fixed libs in the default members but you also use glob paths which the CLI doesn't handle. You have "examples/*" which fails to canonicalize because it isn't a path. We should expand the glob path before looking for the crates

@ealmloff ealmloff added bug Something isn't working cli Related to the dioxus-cli program labels Nov 10, 2025
@newfla
Copy link
Author

newfla commented Nov 10, 2025

You have "examples/*" which fails to canonicalize because it isn't a path. We should expand the glob path before looking for the crates

What actually is panicking is canonicalize on the first memeber in default-members.
Calling dx inside examples/dioxus causes realpath examples/dioxus to fail: with this pr dx will stop trying default members and defaulting to the current dir.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working cli Related to the dioxus-cli program

Projects

None yet

Development

Successfully merging this pull request may close these issues.

dx-cli 0.7.0 fails on default-members

2 participants