Skip to content

build error #47

@zzz6519003

Description

@zzz6519003
➜  substrate-tutorials git:(main) ✗ cargo check
warning: virtual workspace defaulting to `resolver = "1"` despite one or more workspace members being on edition 2021 which implies `resolver = "2"`
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
note: for more details see https://doc.rust-lang.org/cargo/reference/resolver.html#resolver-versions
    Blocking waiting for file lock on build directory
    Checking sp-core v6.0.0 (https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#ce10b9f2)
error[E0308]: mismatched types
   --> /Users/papa/.cargo/git/checkouts/substrate-ef701c1d76c9f8aa/ce10b9f/primitives/core/src/sr25519.rs:591:33
    |
591 |           let mini_key: MiniSecretKey = mini_secret_from_entropy(entropy, password.u...
    |  _______________________-------------___^
    | |                       |
    | |                       expected due to this
592 | |             .expect("32 bytes can always build a key; qed");
    | |___________________________________________________________^ expected `MiniSecretKey`, found `schnorrkel::keys::MiniSecretKey`
    |
note: two different versions of crate `schnorrkel` are being used; two types coming from two different versions of the same crate are different types even if they look the same
   --> /Users/papa/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/schnorrkel-0.9.1/src/keys.rs:99:1
    |
99  | pub struct MiniSecretKey(pub (crate) [u8; MINI_SECRET_KEY_LENGTH]);
    | ^^^^^^^^^^^^^^^^^^^^^^^^ this is the expected type `MiniSecretKey`
    |
   ::: /Users/papa/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/schnorrkel-0.11.4/src/keys.rs:99:1
    |
99  | pub struct MiniSecretKey(pub (crate) [u8; MINI_SECRET_KEY_LENGTH]);
    | ^^^^^^^^^^^^^^^^^^^^^^^^ this is the found type `schnorrkel::keys::MiniSecretKey`
    |
   ::: /Users/papa/.cargo/git/checkouts/substrate-ef701c1d76c9f8aa/ce10b9f/primitives/core/src/sr25519.rs:31:5
    |
31  | use schnorrkel::{
    |     ---------- one version of crate `schnorrkel` used here, as a direct dependency of the current crate
    |
   ::: /Users/papa/.cargo/git/checkouts/substrate-ef701c1d76c9f8aa/ce10b9f/primitives/core/src/ed25519.rs:48:5
    |
48  | use substrate_bip39::seed_from_entropy;
    |     --------------- one version of crate `schnorrkel` used here, as a dependency of crate `substrate_bip39`
    = help: you can use `cargo tree` to explore your dependency tree

For more information about this error, try `rustc --explain E0308`.
error: could not compile `sp-core` (lib) due to 1 previous error

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions