zkevm-circuits icon indicating copy to clipboard operation
zkevm-circuits copied to clipboard

Add `workspace.package` and `workspace.dependencies` to avoid duplicate

Open silathdiir opened this issue 1 year ago • 3 comments

Describe the feature you would like

Reference cargo-workspace-deduplicate, workspace-package and workspace-dependecies, suppose if we could add workspace.package and workspace.dependencies to root Cargo.toml:

[workspace.package]
version = "0.1.0"
edition = "2021"
authors = ["The appliedzkp team"]
license = "MIT OR Apache-2.0"

[workspace.dependencies]
env_logger = "0.9"
log = "0.4"
rand = "0.8"
...

Then update Cargo.toml in sub-crates:

[package]
name = "zkevm-circuits"
version.workspace = true
edition.workspace = true
authors.workspace = true
license.workspace = true

[dependencies]
env_logger.workspace = true
log.workspace = true
rand.workspace = true
...

cargo-dependency-inheritor could be used to fix automatically (but seems we may need some manual check for different crate versions and format).

Additional context

No response

silathdiir avatar Oct 09 '23 08:10 silathdiir

I like the idea and I think we should do it. We can have more consistency in dependencies between crates. @ed255 or @KimiWu123, can you provide a second opinion on this?

ChihChengLiang avatar Oct 10 '23 14:10 ChihChengLiang

Good idea! However, it usually occurs some troubles to manage dependencies among sub-moduels like this proposal, but it's nice to give it a try and see how it goes.

KimiWu123 avatar Oct 11 '23 07:10 KimiWu123

Sounds good to me to try this change! It can clean up the dependency management, specially for the halo2_proofs which has a hardcoded git url and tag in many of the subcrates.

ed255 avatar Oct 24 '23 01:10 ed255