paritytech / polkadot-sdk

The Parity Polkadot Blockchain SDK
https://polkadot.network/
1.87k stars 684 forks source link

QOL improvement: fix incorrect error that shows up in rust-analyzer for pallet storages #212

Open sam0x17 opened 1 year ago

sam0x17 commented 1 year ago

A few places in the code there is something weird with #[pallet::genesis_build] and I think a few other scenarios involving storages that causes the following error (only in rust-analyzer, but possibly in other static analyzers). As far as I know, this is the only remaining thing that rust-analyzer has an issue with after my recent overhaul of some of the pallet macros. I don't know exactly what is doing this and haven't looked into it yet, however this would be cool to fix someday because then my whole working directory for substrate would no longer have any red 😆

Screenshot 2023-02-21 at 3 35 13 PM
kianenigma commented 1 year ago

Gonna mark this is mentor to signify we are happy to pay for someone to do this, but obviously we don't know the path forward :D

sam0x17 commented 1 year ago

Whatever this is the culprit is likely in the expansion for #[pallet::genesis_build]