-
Notifications
You must be signed in to change notification settings - Fork 710
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use real rust type for pallet alias in runtime
macro
#4769
Conversation
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.
lgtm high level
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.
Loogs good, except the doc for #[runtime]
macro are not updated.
I also wanted to log this for you in a new issue that I have not done so far:
The docs for frame::runtime
, unlike almost all other frame macros, live in the procedural crate, and therefore is ignore
-ed code. It would align with our standards better to move them to where it is being re-exported so the code snippets can be live.
Is this syntax supported?
This is what I would expect for |
Yes, this is the way its added now. Will add this in the docify example as well. |
bot fmt |
@gupnik https://gitlab.parity.io/parity/mirrors/polkadot-sdk/-/jobs/6499660 was started for your command Comment |
@gupnik Command |
substrate/frame/support/procedural/src/runtime/parse/pallet_decl.rs
Outdated
Show resolved
Hide resolved
substrate/frame/support/procedural/src/runtime/parse/pallet_decl.rs
Outdated
Show resolved
Hide resolved
substrate/frame/support/procedural/src/runtime/parse/pallet_decl.rs
Outdated
Show resolved
Hide resolved
substrate/frame/support/procedural/src/runtime/parse/pallet_decl.rs
Outdated
Show resolved
Hide resolved
substrate/frame/support/procedural/src/runtime/parse/pallet_decl.rs
Outdated
Show resolved
Hide resolved
…cl.rs Co-authored-by: Bastian Köcher <[email protected]>
…cl.rs Co-authored-by: Bastian Köcher <[email protected]>
…cl.rs Co-authored-by: Bastian Köcher <[email protected]>
…cl.rs Co-authored-by: Bastian Köcher <[email protected]>
…cl.rs Co-authored-by: Bastian Köcher <[email protected]>
The CI pipeline was cancelled due to failure one of the required jobs. |
Fixes paritytech#4723. Also, closes paritytech#4622 As stated in the linked issue, this PR adds the ability to use a real rust type for pallet alias in the new `runtime` macro: ```rust #[runtime::pallet_index(0)] pub type System = frame_system::Pallet<Runtime>; ``` Please note that the current syntax still continues to be supported. CC: @shawntabrizi @kianenigma --------- Co-authored-by: command-bot <> Co-authored-by: Bastian Köcher <[email protected]>
Fixes #4723. Also, closes #4622
As stated in the linked issue, this PR adds the ability to use a real rust type for pallet alias in the new
runtime
macro:Please note that the current syntax still continues to be supported.
CC: @shawntabrizi @kianenigma