pallet macro: do not generate try-runtime related code when frame-support...
pallet macro: do not generate try-runtime related code when frame-support doesn't have try-runtime. (#5099)
Status: Ready for review
Fix https://github.com/paritytech/polkadot-sdk/issues/5092
Introduce a new macro in frame-support which discard content if
`try-runtime` is not enabled.
Use this macro inside `frame-support-procedural` to generate code only
when `frame-support` is compiled with `try-runtime`.
---------
Co-authored-by:
Bastian Köcher <git@kchr.de>
Showing
- substrate/frame/support/procedural/src/pallet/expand/hooks.rs 41 additions, 40 deletions...trate/frame/support/procedural/src/pallet/expand/hooks.rs
- substrate/frame/support/procedural/src/pallet/expand/storage.rs 32 additions, 31 deletions...ate/frame/support/procedural/src/pallet/expand/storage.rs
- substrate/frame/support/src/lib.rs 2 additions, 0 deletionssubstrate/frame/support/src/lib.rs
- substrate/frame/support/test/tests/pallet_ui/pass/simple_storage.rs 32 additions, 0 deletions...frame/support/test/tests/pallet_ui/pass/simple_storage.rs
Please register or sign in to comment