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

Unify common deps to the same version in Cargo.toml of the worksppace #285

Merged
merged 18 commits into from
Jul 25, 2023

Conversation

Xynnn007
Copy link
Member

This PR unifies common deps to the same version via *.workspace = true.

This will help to maintain the dependencies of the whole workspace without fix them case by case.

Signed-off-by: Xynnn007 <xynnn@linux.alibaba.com>
Signed-off-by: Xynnn007 <xynnn@linux.alibaba.com>
Signed-off-by: Xynnn007 <xynnn@linux.alibaba.com>
@Xynnn007 Xynnn007 self-assigned this Jul 17, 2023
@Xynnn007 Xynnn007 marked this pull request as draft July 17, 2023 08:50
Signed-off-by: Xynnn007 <xynnn@linux.alibaba.com>
Signed-off-by: Xynnn007 <xynnn@linux.alibaba.com>
Signed-off-by: Xynnn007 <xynnn@linux.alibaba.com>
Signed-off-by: Xynnn007 <xynnn@linux.alibaba.com>
Signed-off-by: Xynnn007 <xynnn@linux.alibaba.com>
Signed-off-by: Xynnn007 <xynnn@linux.alibaba.com>
Signed-off-by: Xynnn007 <xynnn@linux.alibaba.com>
Signed-off-by: Xynnn007 <xynnn@linux.alibaba.com>
Signed-off-by: Xynnn007 <xynnn@linux.alibaba.com>
Signed-off-by: Xynnn007 <xynnn@linux.alibaba.com>
Signed-off-by: Xynnn007 <xynnn@linux.alibaba.com>
protoc is needed in step `Build and install with feature`, as it by
default uses gRPC.

Signed-off-by: Xynnn007 <xynnn@linux.alibaba.com>
Due to hyperium/tonic#1345, we should update
the rust compiler and project to support tonic 0.9

Signed-off-by: Xynnn007 <xynnn@linux.alibaba.com>
…crypto

https://doc.rust-lang.org/cargo/reference/features.html suggests that a
question mark in the feature to ensure that this dependency will not be
activated when nowhere else activates that.

Signed-off-by: Xynnn007 <xynnn@linux.alibaba.com>
clap derived arguments uses `-` but the arguments definition is required
an undercore `_`

Signed-off-by: Xynnn007 <xynnn@linux.alibaba.com>
@Xynnn007 Xynnn007 marked this pull request as ready for review July 19, 2023 08:25
@jiangliu
Copy link
Member

Any introduction about the workspace attribute in dependency?
What happens when publishing a crate with dep.workspeace attribute?

@Xynnn007
Copy link
Member Author

Xynnn007 commented Jul 25, 2023

@jiangliu The workspace = true will use the same version as the workspace's Cargo.toml

I tried with the command cargo publish --dry-run -p coco_keyprovider

and it will do all the steps to publish a crate to crates.io except uploading that. This will also geenrate a source code package to be uploaded in target/package/coco_keyprovider-0.1.0, whose Cargo.toml is like

...
[dependencies.aes-gcm]
version = "0.10.2"

[dependencies.anyhow]
version = "1.0"

[dependencies.base64]
version = "0.13.0"
...

That means all the XXX.workspace = true is translated into a version of that package in crates.io

Why I use .workspace = true is that ocicrypt-rs/image-rs and attestation-agent stack are built in a same final binary. Use same version dep will help to decrease the built binary size and be easy to maintain.

@jiangliu jiangliu merged commit eef059b into confidential-containers:main Jul 25, 2023
@Xynnn007 Xynnn007 deleted the fix-dep branch July 25, 2023 15:02
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

Successfully merging this pull request may close these issues.

2 participants