Skip default members when canonicalize fails
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
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
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.