paritytech / polkadot-sdk

The Parity Polkadot Blockchain SDK
https://polkadot.com/
1.93k stars 710 forks source link

Issues with Unresolved Types in `runtime/src/lib.rs` While Working with Substrate #5458

Open anchalshivank opened 3 months ago

anchalshivank commented 3 months ago

I'm currently learning Substrate and following a tutorial to set up a blockchain. However, I've encountered a problem in the runtime/src/lib.rs file where the compiler is unable to recognize several types, including Runtime, Grandpa, Aura, and derive_impl.

Here are the specific issues I'm facing:

The types Runtime, Grandpa, and Aura are not being recognized by the compiler.

The macro derive_impl is also unrecognized.

I'm using Rust Rover as my IDE. I've ensured that my Rust toolchain is up-to-date and that I’ve followed the tutorial closely. Despite this, the errors persist.

Steps I've Tried:

  1. Verified that all dependencies in Cargo.toml are correctly specified.

  2. Tried running cargo clean and rebuilding the project.

  3. Checked that the necessary Substrate crates are included and up-to-date.

Has anyone else encountered this issue, and how can I resolve it? Any guidance would be greatly appreciated! Environment:

IDE: Rust Rover

Rust Toolchain: Stable (latest version)

Substrate: Following the official tutorial

Most of the types are unrecognized in my ide

I just followed the substrate tutorial from the documentation

bkchr commented 3 months ago

Is rustc complaining or is it the IDE?