-
-
Notifications
You must be signed in to change notification settings - Fork 2
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
No tag or branch specified in the Cargo.toml files #2
Comments
This makes sense but I guess it needs much more efforts to maintain these crates’ versions. Especially hard when it comes to the sgx sdk which should be one and only one version among all dependencies. So, the crates’ versions (or tags) can be strongly bind to age versions. That is, there are several sets of crates for different sgx sdk versions. When the sgx sdk version bumps, all crates need to bump corresponding dependencies’ versions and create new tags. BTW, for the Teaclave project. We don’t use url directly. Instead, we vendored all crates and use specific versions. This will make things easier. https://github.com/apache/incubator-teaclave/blob/develop/attestation/Cargo.toml |
The root of this problem is cargo's current implementation. As you can see: [dependencies]
a = {git = "https://github.com/aaa/bbb"}
a = {git = "https://github.com/aaa/bbb.git"}
a = {git = "https://github.com/aaa///bbb"}
a = {git = "https://github.com/aaa/bbb", rev ="0123456789abcdef"}
a = {git = "https://github.com/aaa/bbb", branch = "ccc"}
a = {git = "https://github.com/aaa/bbb", tag = "ddd"}
a = {git = "https://github.com/fff/bbb", tag = "ddd"} All of the above 7 crates are treated as different crates. |
"Dedup by hash" in Cargo.lock is a workaround and I've successfully done this several times before. If cargo is not improved, we don't have a good way to solve it. I think we could build a tool to do this in Cargo.lock automatically. |
Thanks for your response |
Hi,
We are trying to increase the rust-sgx-sdk from 1.0.6 to 1.1.0, and we have noticed that you have already moved the crates from
rust-sgx-sdk/third_party
here, so we modify our Cargo.toml file like this:When compiling our project, we find that the
serde_json
crate in thehttps://github.com/mesalock-linux/serde-json-sgx
also depends on theserde
crate, but notag=
specified, which makes the compiling failed.I think the
tag=
should be specified in all thethird_party
crates to control the version of cratesHere is the
cargo tree -d
cmd output:we can see there are two
serde
crates here.The text was updated successfully, but these errors were encountered: