Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Specifying synchronized dependencies #2479

Closed
mikedilger opened this issue Mar 13, 2016 · 4 comments
Closed

Specifying synchronized dependencies #2479

mikedilger opened this issue Mar 13, 2016 · 4 comments

Comments

@mikedilger
Copy link

It would be helpful in some situations to be able to specify synchronization between dependencies, e.g.:

exactly_one_of { 
  {  serde = 0.6;  serde_codegen = 0.6 },
  { serde = 0.7; serde_codegen = 0.7 }
}

In some downstream projects, cargo occasionally mixes-and-matches these versions for textnonce and the compile error then appears in textnonce, for which a bug is logged that doesn't really exist. It's very confusing to the downstream user. The real bug is that one of their dependencies requires serde 0.6, another requires serde 0.7, and it was never going to work.... but the blame lands on textnonce because that's what fails to compile first: mikedilger/textnonce#7

@mikedilger
Copy link
Author

Alternatively conditional dependencies, e.g.:

serde = ">= 0.6, < 0.8"
serde_codegen = { if serde = "0.6" then "0.6";  if serde = "0.7" then "0.7" }

(ignore my atrocious syntax)

@alexcrichton
Copy link
Member

This is somewhat along the lines of #2064 I think?

@mikedilger
Copy link
Author

Similar

@carols10cents
Copy link
Member

I believe this will be solved by public/private dependencies, the RFC for which has been accepted, and now has a tracking issue: rust-lang/rust#44663

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants