Uh oh!
There was an error while loading. Please reload this page.
Migrate pallet-sudo to pallet! - #8448
Conversation
gui1117
left a comment
There was a problem hiding this comment.
polkadot doesn't needs migration as not used in polkadot/kusama and westend has unchanged pallet prefix.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Co-authored-by: Guillaume Thiolliere <gui.thiolliere@gmail.com>
Co-authored-by: Guillaume Thiolliere <gui.thiolliere@gmail.com>
Co-authored-by: Guillaume Thiolliere <gui.thiolliere@gmail.com>
Co-authored-by: Guillaume Thiolliere <gui.thiolliere@gmail.com>
CI is failing with this warning as error https://gitlab.parity.io/parity/substrate/-/jobs/867537#L473: I don't get it because it is clearly used by the |
gui1117
commented
Mar 26, 2021
yes but the metadata function (which uses call_functions) generated by construct_runtime is unused I guess, thus it complains about unused items. |
ascjones
commented
Mar 26, 2021
Ah yeah, I wonder how that worked with the legacy |
gui1117
commented
Mar 26, 2021
maybe rustc is not doing the same checks for both macros kind. #[test]fndummy_use(){Test::metadata();}Or actually we can add in construct_runtime |
ascjones
commented
Mar 26, 2021
The original macro already annotated the generated fn with |
* WIP convert sudo pallet to attribute macros * Fix up tests and migrate mock * Fix up genesis build * Migrate doc comment example * Update frame/sudo/src/lib.rs Co-authored-by: Guillaume Thiolliere <gui.thiolliere@gmail.com> * Update frame/sudo/src/lib.rs Co-authored-by: Guillaume Thiolliere <gui.thiolliere@gmail.com> * Update frame/sudo/src/lib.rs Co-authored-by: Guillaume Thiolliere <gui.thiolliere@gmail.com> * Update frame/sudo/src/lib.rs Co-authored-by: Guillaume Thiolliere <gui.thiolliere@gmail.com> * Allow unused metadata call_functions Co-authored-by: Guillaume Thiolliere <gui.thiolliere@gmail.com>
Part of #7882.
Converts the
Sudopallet to the new pallet attribute macro introduced in #6877.Following the upgrade guidelines here: https://crates.parity.io/frame_support/attr.pallet.html#upgrade-guidelines.
From https://crates.parity.io/frame_support/attr.pallet.html#checking-upgrade-guidelines
So users of the
Sudopallet must be careful about the name they used inconstruct_runtime!. Hence theruntime-migrationlabel, which might not be needed depending on the configuration of theSudopallet.