Skip to content

Commit a3ecfa6

Browse files
committed
fix: Extend version.from with the 'distribution' idea
1 parent 0f544d2 commit a3ecfa6

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

text/3516-public-private-dependencies.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -384,6 +384,10 @@ Compared to the resolver doing this implicitly
384384
The downside is it feels like the declaration is backwards.
385385
If you have one core crate (e.g. `clap`) and many crates branching off (e.g. `clap_complete`, `clap_mangen`),
386386
it seems like those helper crates should have their version picked from `clap`.
387+
This can be worked around by publishing a `clap_distribution` package that has dependencies on every package.
388+
Users would depend on `clap_distribution` through a never-matching target-dependency so it doesn't affect builds.
389+
It exists so users would `version.from = ["clap_distribution"]` it, keeping the set in sync.
390+
This only helps when the packages are managed by a single project.
387391

388392
Whether this should be specified across all sources (`from`) or per source (`registry.from`, `git.from`, `path.from`) will need to be worked out.
389393
See [rust-lang/cargo#6921](https://github.com/rust-lang/cargo/issues/6921) for an example of using this for git dependencies.

0 commit comments

Comments
 (0)