Workspace members (globs) should be discovered from the directory containing Cargo.toml with these workspaces, not from the directory the user happens to in.
Take for example android-ndk-rs. When cd'd into ndk-examples this would find the root manifest file in ../Cargo.toml, but try to glob in the current directory - ndk-examples - where it's obviously not going to find another ndk-examples containing Cargo.toml. The Subcommand constructor hence considers this package as not being in a workspace and emits target_dir at ndk-examples/target. This fails later in the build when files cannot be found in the toplevel target/ dir.
Workspace members (globs) should be discovered from the directory containing
Cargo.toml
with these workspaces, not from the directory the user happens to in.Take for example android-ndk-rs. When cd'd into
ndk-examples
this would find the root manifest file in../Cargo.toml
, but try to glob in the current directory -ndk-examples
- where it's obviously not going to find anotherndk-examples
containingCargo.toml
. TheSubcommand
constructor hence considers this package as not being in a workspace and emitstarget_dir
atndk-examples/target
. This fails later in the build when files cannot be found in the topleveltarget/
dir.Fixes https://github.com/rust-windowing/android-ndk-rs/issues/105