paritytech / polkadot-sdk

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

Emit better error messages when user forgets to import a pallet part and tries to use a type defined by the part #311

Open KiChjang opened 3 years ago

KiChjang commented 3 years ago

paritytech/substrate#9097 is one possible solution, but it (ab)uses #[deprecated] as a means to issue a custom warning message, which is not ideal.

KiChjang commented 3 years ago

We can take a look at https://github.com/gww-parity/substrate_lints and determine whether it's possible to write it as a lint.

KiChjang commented 3 years ago

Rewriting as a lint does not make sense; the goal here is to improve compiler error messages, lints are specifically designed to catch logical bugs, or bugs that were not caught by the compiler checks.