Open gupnik opened 5 months ago
Abstract away the executive similar to https://github.com/paritytech/substrate/pull/14742
I am not sure about this. but it is a good candidate.
Alternatively, what I see missing rn is mostly that AllPallets
is used in Type Executive
but is never declared. Bringing it in scope might help.
I have also pointed out before that this macro seems to do some automatic use *
that makes it not intuitive to use, and not in par with frame::pallet
macro. Would be great if you can log this as well.
Here's my mentality:
You import polkadot-sdk-frame
. This docs for this crate should be informative.
#[frame::pallet]
pub mod pallet1 {
use frame::pallet_prelude::*;
}
#[frame::pallet]
pub mod pallet2 {
use frame::pallet_prelude::*;
}
#[cfg(test)]
pub mod tests {
pub use frame::testing_prelude::*;
#[frame::runtime]
pub mod runtime {
use frame::runtime_prelude::*;
}
}
So the experience and behavior you would get from all of these should be as similar as possible.
I have also pointed out before that this macro seems to do some automatic
use *
that makes it not intuitive to use, and not in par withframe::pallet
macro. Would be great if you can log this as well.
It actually maintains the same scope as with the previous CRV1. I can scope those under a mod
and expose all of the generated types such as RuntimeEvent
by default, but I am not sure if that adds a lot of value?
use frame::runtime_prelude::*;
What does this runtime_prelude
provide?
What does this runtime_prelude provide?
Types that are needed for a typical runtime, the existing code should to some extent describe this
https://github.com/paritytech/polkadot-sdk/pull/1378 introduced the new runtime macro. This issue tracks the follow-up items:
experimental
flag once its tested in Rococo/Westendcfg
attrs or throw an error if they should not be used CC: @ggwpez