Open jonatino opened 5 months ago
@kornelski depends on what the intended behavior should be (I agree there could be a better alternative to parent()
). Should cargo vcpkg build
crawl to nested subdirectories and build those vcpkg's as well or just build inside the folder where the command is ran?
In my specific case with bug #23, sdl2
install was coming from a dependency of an optional dependency that was not even in use due to it targeting a different platform entirely.
I think the behavior of the tool is more predictable if the scope is limited to the current folder similar to how cargo build
works. If you for some reason need to build a vcpkg for a dependency, it would make sense to add that to your vcpkg
metadata config in the Cargo.toml
file of the project that needs it. If cargo vcpkg build
crawls the entire dependency tree, I can see it leading to a lot of unpredictable behavior such as my bug #23.
Are you sure parent() is a robust check? What about crates nested in subdirectories?
Cargo metadata has workspace_members array.