dioxus icon indicating copy to clipboard operation
dioxus copied to clipboard

Skip default members when canonicalize fails

Open newfla opened this issue 1 month ago • 2 comments

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 avatar Nov 09 '25 16:11 newfla

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 avatar Nov 10 '25 14:11 ealmloff

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.

newfla avatar Nov 10 '25 14:11 newfla