-
Notifications
You must be signed in to change notification settings - Fork 210
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
avoid duplicate definition of crates when pulling from git #1784
Conversation
I am not sure I like this approach. It also may create issues with crate publishing. Do you have an example of it being used elsewhere? |
We've been using that scheme in This triggered in RustCrypto/AEADs#662
|
7db3024
to
eeab1c9
Compare
This allows to pull a git dependency from outside this workspace without having to also pull all the transitive dependencies from within this workspace. Otherwise, the transitive dependency gets duplicated and you end up with objects not implementing trait error that are hard to debug. For example, if you pull aead = { git = "https://.../traits.git" } you end up with two definitions of crypto-common, one from crates.io and one from git. This causes issues because the objects you then pass to the aead traits do not implements the required traits from the crypto-common crates.
eeab1c9
to
8c19714
Compare
I don't think that having this additional line during transitory stages is problematic. We still need to patch a bunch of other dependencies and I think it makes it easier to track which dependencies we need to (pre-)publish for the repo. |
I won't fight over this. Your call. |
This allows to pull a git dependency from outside this workspace without having to also pull all the transitive dependencies from within this workspace.
Otherwise, the transitive dependency gets duplicated and you end up with objects not implementing trait error that are hard to debug.
For example, if you pull aead = { git = "https://.../traits.git" } you end up with two definitions of crypto-common, one from crates.io and one from git.
This causes issues because the objects you then pass to the aead traits do not implements the required traits from the crypto-common crates.