7

I build some custom pallet and today I saw following warning while building my node and I would like to ask: only me has the warning?

warning: some crates are on edition 2021 which defaults to `resolver = "2"`, but virtual workspaces default to `resolver = "1"`
    note: to keep the current resolver, specify `workspace.resolver = "1"` in the workspace root's manifest
    note: to use the edition 2021 resolver, specify `workspace.resolver = "2"` in the workspace root's manifest

I ask because I want to avoid too much chaos while building.

3
  • I was about to ask this a few days ago, but when I changed to the stable compiler it disappeared
    – Simson
    Jun 23 at 3:39
  • I came to the conclusion it did not break anything important
    – Simson
    Jun 23 at 3:40
  • Both resolver 1 and 2 will generate binary identical wasm
    – Simson
    Jun 23 at 4:12

1 Answer 1

6

Just add the following to your workspace Cargo.toml:

[workspace]
resolver = "2"

Here are more information on this new resolver. You want this as crates of Substrate are requiring to use this resolver, otherwise you will see weird errors ;)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.