-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Conversation
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
Nice! |
Also renamed some of the odd-named ones. Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
To be fixed in https://github.com/paritytech/substrate/issues/13813 Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
bot rebase |
Rebased |
@@ -120,14 +120,14 @@ pub mod pallet { | |||
#[pallet::call] | |||
impl<T: Config> Pallet<T> { | |||
#[pallet::call_index(0)] | |||
#[pallet::weight(0)] | |||
#[pallet::weight({0})] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note: Some test-only pallets cannot be put in dev mode, since they access the storage info.
But we could add custom lint attributes to suppress certain warnings, similar to how clippy works.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is great love that you released this feature as a crate as I'd like to use it for some of my things ^_^
Should the places with the |
I just tried that locally, and those examples actually compile and have no proper |
bot merge |
* Use proc-macro-warning crate Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Fixup Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Fix pallet_ui tests Also renamed some of the odd-named ones. Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Update dep Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Ignore hardcoded weight warning To be fixed in https://github.com/paritytech/substrate/issues/13813 Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Fix test pallet Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Fix more tests Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> --------- Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> Co-authored-by: parity-processbot <>
This pull request has been mentioned on Polkadot Forum. There might be relevant details there: https://forum.polkadot.network/t/april-updates-for-substrate-and-polkadot-devs/2764/1 |
* polkadot update to v0.9.42 * remove deprecated trait Store uses See paritytech/substrate#13535 * remove deprecated Weight::from_{ref_time, proof_size} See paritytech/substrate#13475 * allowlist one constant weight See paritytech/substrate#13798 * add new trait associated types * polkadot update to v0.9.42 (xcm) * fixup! remove deprecated trait Store uses * teerex/mock: add missing trait imports * claims/tests: fix benchmark as described in substrate/12951 See: paritytech/substrate#12951 * claims/tests: fix claiming_while_vested_doesnt_work by giving it the existential deposit (ED) Co-authored-by: coax1d <andrewburger1991@gmail.com> --------- Co-authored-by: coax1d <andrewburger1991@gmail.com>
* Use proc-macro-warning crate Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Fixup Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Fix pallet_ui tests Also renamed some of the odd-named ones. Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Update dep Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Ignore hardcoded weight warning To be fixed in https://github.com/paritytech/substrate/issues/13813 Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Fix test pallet Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Fix more tests Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> --------- Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> Co-authored-by: parity-processbot <>
Cleaning up the code a bit by using proc-macro-warning and emitting a warning when using a hard-coded weight on a non-dev-mode pallet (#13774).
In cases where
dev
mode is not possible and you explicitly want to ignore this warning; wrap it in curly brackets like{1}
.This enforces consistent formatting and grammar across different warnings for enhanced developer experience.
and
TODO:
We could also think about a registry of known warnings / errors and have shortened links to them like
parity.link/frame-err-123
to explain how to resolve them.