Uh oh!
There was an error while loading. Please reload this page.
avoid duplicate definition of crates when pulling from git - #1784
Conversation
Uh oh!
There was an error while loading. Please reload this page.
newpavlov
commented
Mar 7, 2025
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
eeab1c9CompareUh oh!
There was an error while loading. Please reload this page.
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
8c19714Comparenewpavlov
commented
Mar 10, 2025
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. |
baloo
commented
Mar 10, 2025
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.