-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Replace 'Module' with 'Pallet' in construct_runtime macro #8372
Conversation
This will needs a companion, and there is remainings usage of deprecated Modle type alias, you can see in the CI continuous-integration/gitlab-test-linux-stable We should deprecate AllModule and AllModuleWithSystem instead of removing them IMHO. Then the only breaking change of this PR is the construct_runtime macro which requires Pallet instead of Module. |
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.
looks good, needs ui tests to be fixed.
To fix them you can run them with stable toolchain and TRYBUILD=overwrite
:
TRYBUILD=overwrite cargo +stable test -p frame-support-test
gonna be honest, did not look at every line of code, but scrolled through quickly |
bot merge |
Trying merge. |
I think a lot of thing need to be changed.
Otherwise, this make people feel so confusing. |
I agree |
Well. Can you assign that to me? : ) |
Yes a PR is welcome, I don't think ppl are working on it, you can ping me on the PR if you open it |
Related Substrate PR: paritytech/substrate#8372
* Bump Substrate * Change usage of "Module" to "Pallet" Related Substrate PR: paritytech/substrate#8372 * Add `OnSetCode` config param Related Substrate PR: paritytech/substrate#8496 * Update Aura Slot duration time type Related Substrate PR: paritytech/substrate#8386 * Add `OnSetCode` to mock runtimes * Add support for multiple justifications Related Substrate PR: paritytech/substrate#7640 * Use updated justification type in more places * Make GenesisConfig type non-optional Related Substrate PR: paritytech/substrate#8275 * Update service to use updated telemetry Related Substrate PR: paritytech/substrate#8143 * Appease Clippy
…#8372) * Use 'Pallet' struct in construct_runtime. * Fix genesis and metadata macro. * Fix 'Pallet' type alias. * Replace 'Module' with 'Pallet' for all construct_runtime use cases. * Replace more deprecated 'Module' struct. * Bring back AllModules and AllPalletsWithSystem type, but deprecate them. * Replace deprecated 'Module' struct from merge master. * Minor fix. * Fix UI tests. * Revert UI override in derive_no_bound. * Fix more deprecated 'Module' use from master branch. * Fix more deprecated 'Module' use from master branch.
* `ModuleId` to `PalletId` - part of paritytech#8372 * fix doc * move `PalletId` to `frame-support` * fix compile * fix tests * `ModuleId` to `PalletId` * subcommand `moduleid` to `palletid`
* `ModuleId` to `PalletId` - part of paritytech#8372 * fix doc * move `PalletId` to `frame-support` * fix compile * fix tests * `ModuleId` to `PalletId` * subcommand `moduleid` to `palletid`
Part of #8287 .
Changes in this PR:
Module
withPallet
as pallet keyword inconstruct_runtime
macro.module
related types/fns inconstruct_runtime
impl.Pallet
type alias indecl_module
, to make it compatible with newPallet
keyword inconstruct_runtime
.construct_runtime
usage in mocks, runtimes.Module
type alias in pallet macro. Additionally replace all deprecated usage.cc @shawntabrizi @thiolliere
Polkadot companion: paritytech/polkadot#2629