Given a virtual manifest like so:
[workspace]
members = [
"a",
"b",
"c",
"d",
]
It would be useful to declare dependencies that are shared between members in a central place (such as this manifest):
[dependencies]
serde = "1.0.45"
serde_json = "1.0.17"
serde_derive = "1.0.45"
When building if we are looking for crate serde in, for example, package a but a/Cargo.toml @ dependencies does not list serde we would look in the virtual manifest that includes a as a member (if there is one).
This will no doubt complicate dependency resolution somewhat but I do not know to what extent so if it is too crazy please feel free to close this ticket.
The idea for this is that, at least in my experience, workspace members have certain shared deps that you want to stay in sync and this makes that easier to express.
I also think that this feature would be really nice to have in Cargo.
Imagine if your workspace have... lets say... 20 projects inside it. All of them with the same core 10 dependencies. What if you want to ensure all of your workspace projects use the same version? What if you want to upgrade the version of one of them, include another one or remove some of them?
For anyone interested in this issue I've posted an RFC which I think will help resolve this. Feedback on the RFC would be most welcome!
Most helpful comment
For anyone interested in this issue I've posted an RFC which I think will help resolve this. Feedback on the RFC would be most welcome!