You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
#47 implemented awareness of parent workspaces when running cargo bundle. It seems not to work, though, when the parent workspace is also a project of its own - e.g. foo contains bar, like so:
[package]
name = "foo"
version = "0.1.0"
authors = ["Søren Mortensen <[email protected]>"]
[dependencies]
[workspace]
members = [
"bar",
]
I'm not entirely sure this is an intended usage of Cargo workspaces, but I had this setup in a project (until I changed it to work around this issue1). Running cargo bundle within bar/ results in the following error message:
error: Failed to copy binary from "/private/tmp/foo/bar/target/debug/bar"
Caused by: "/private/tmp/foo/bar/target/debug/bar" does not exist
It seems to be the case that the parent foo/target/ directory is not detected in the way it should be, and foo/bar/target/ is being used instead.
1Edit: to clarify, the workaround I used was to change the structure of the project so that it looks like so:
#47 implemented awareness of parent workspaces when running
cargo bundle
. It seems not to work, though, when the parent workspace is also a project of its own - e.g.foo
containsbar
, like so:The contents of
foo/Cargo.toml
are:I'm not entirely sure this is an intended usage of Cargo workspaces, but I had this setup in a project (until I changed it to work around this issue1). Running
cargo bundle
withinbar/
results in the following error message:It seems to be the case that the parent
foo/target/
directory is not detected in the way it should be, andfoo/bar/target/
is being used instead.1Edit: to clarify, the workaround I used was to change the structure of the project so that it looks like so:
...where the contents of
baz/Cargo.toml
are:The text was updated successfully, but these errors were encountered: