Workspaces inheritance breaks for a workspace located in a sub-directory of another workspace #12154
Labels
A-workspaces
Area: workspaces
C-bug
Category: bug
S-needs-info
Status: Needs more info, such as a reproduction or more background for a feature request.
Problem
If I have two workspaces structured like the following:
where
example-lib
uses workspace inheritance to inherit the package version from inner-workspace, e.g. with theCargo.toml
:and
example-lib
is added as a path dependency toouter-workspace-crate
, running pretty much any cargo subcommand will fail with:This appears to be caused by cargo attempting to inherit the package version from the root
Cargo.toml
rather thaninner-workspace/Cargo.toml
. If I add:to the root
Cargo.toml
, everything works as expected. Similarly, if I moveinner-workspace
to not be a sub-directory of the root workspace, the cargo commands work as expected.Steps
I have created an minimal reproduction here: https://github.com/jarhodes314/cargo-workspace-inheritance-repro, and explained in that README the structure that is required.
Possible Solution(s)
No response
Notes
No response
Version
The text was updated successfully, but these errors were encountered: