rust-mobile / cargo-subcommand

Library for implementing cargo subcommands
6 stars 6 forks source link

Linearize workspace detection #23

Closed MarijnS95 closed 1 year ago

MarijnS95 commented 1 year ago

When cargo scans for a workspace it simply walks up the directories until finding the first Cargo.toml with a [workspace] declaration. All crates are detected relative to this, and no special skipping behaviour (walking further up the directories) occurs when a package was not found (was previously happening in find_package()+member()).

Simplify the original code somewhat by making this feat more obvious, rejecting more invalid configurations.