Skip to content
This repository has been archived by the owner on Jul 5, 2024. It is now read-only.

Commit

Permalink
chore: set resolver v2 at the workspace level (#1731)
Browse files Browse the repository at this point in the history
### Description

Cargo defaults to `resolver = "2"` in edition 2021 only for singular
crates. Workspace tho defaults to the old `resolver = "1"` and will
override this setting for all crates in the workspace. [The
guideline](https://doc.rust-lang.org/cargo/reference/workspaces.html#virtual-workspace)
is to manually set the `resolver = "2"` on workspace level.
This was documented recently and since a few releases produces a warning
on building. You don't see it due to the `rust-toolchain` setting.

### Type of change

- [x] Bug fix (non-breaking change which fixes an issue) (not really a
bugfix but that's the closest match)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing
functionality to not work as expected)
- [ ] This change requires a documentation update

### Contents

- specifies `resolver = "2"` on workspace level
- removes `resolver = "2"` from light-client-poc/Cargo.toml because it
was ignored anyway

This also fixes this warning:

```
warning: resolver for the non root package will be ignored, specify resolver at the workspace root:
package:   /data/bishop/zkevm-circuits/light-client-poc/Cargo.toml
workspace: /data/bishop/zkevm-circuits/Cargo.toml
```
  • Loading branch information
bishopcheckmate authored Jan 17, 2024
1 parent 4dc76eb commit d5fe917
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
[workspace]
resolver = "2"
members = [
"zkevm-circuits",
"bus-mapping",
Expand Down
2 changes: 1 addition & 1 deletion integration-tests/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ mock_prover = []

[build-dependencies]
env = "0.0.0"
ethers = "=2.0.10"
ethers = { version = "=2.0.10", features = ["ethers-solc"] }
ethers-contract-abigen = "=2.0.10"
glob = "0.3.1"
log = "0.4.14"
Expand Down
3 changes: 1 addition & 2 deletions light-client-poc/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
name = "light-client-poc"
version = "0.1.0"
edition = "2021"
resolver = "2"

[dependencies]
serde = { version = "1.0", features = ["derive"] }
Expand All @@ -28,4 +27,4 @@ ahash = "=0.8.6"
ctor = "0.1.22"

[features]
disable-keccak = []
disable-keccak = []

0 comments on commit d5fe917

Please sign in to comment.