[FRAME Core] Adds ability to split a pallet across multiple files (#13950)

* Initial setup

* Updates macro_magic version and refactors accordingly

* Removes unwrap from macro

* Splits into multiple sections

* Uses call_site to fix macro hygiene issue

* Initial setup

* Removes unnecessary changes

* Moves template palet back

* Updates cargo.lock

* Moves BagsList inside mod

* Comments access to internal functions for now

* Updates tests

* Uncomments code

* Fixes test

* Moves bags-list to separate crate

* Initial setup

* Removes bags-list changes

* Fix structure

* Minor update

* Addresses review comment

* Adds a couple of UI tests. More to be added

* Adds err files

* Adds test for no pallet

* Adds doc

* Updates versions

* Adds benchmarking

* Updates doc link

* ".git/.scripts/commands/fmt/fmt.sh"

* Minor update

* Adds missing changes

* ".git/.scripts/commands/fmt/fmt.sh"

* Update frame/support/procedural/src/lib.rs

Co-authored-by: Sam Johnson <sam@durosoft.com>

* Addresses review comments

* Addresses review comments

* ".git/.scripts/commands/fmt/fmt.sh"

* Update frame/support/procedural/src/lib.rs

Co-authored-by: Sam Johnson <sam@durosoft.com>

* Update frame/support/procedural/src/lib.rs

Co-authored-by: Sam Johnson <sam@durosoft.com>

* Update frame/support/procedural/src/lib.rs

Co-authored-by: Sam Johnson <sam@durosoft.com>

* Adds UI test for disambiguation

* ".git/.scripts/commands/fmt/fmt.sh"

* Makes clippy happy

* ".git/.scripts/commands/fmt/fmt.sh"

* Fixes frame support test

* Fixes frame support test

* Split items other than storage

* Updates versions

* Fixes some review comments

* Addresses review comments

* ".git/.scripts/commands/fmt/fmt.sh"

* Updates docs

* Adds experimental disclaimer

* ".git/.scripts/commands/fmt/fmt.sh"

* Update frame/support/test/tests/split_ui/no_section_found.rs

Co-authored-by: Sam Johnson <sam@durosoft.com>

* Addresses review comments

* Fixes test

---------

Co-authored-by: command-bot <>
Co-authored-by: command-bot <ci@gitlab.parity.io>
Co-authored-by: Sam Johnson <sam@durosoft.com>
This commit is contained in:
gupnik
2023-06-27 17:42:03 +05:30
committed by GitHub
parent 13cb7ccc57
commit 5d8774016c
23 changed files with 837 additions and 5 deletions
+4 -1
View File
@@ -17,6 +17,7 @@ pallet-default-config-example = { default-features = false, path = "./default-co
pallet-example-offchain-worker = { default-features = false, path = "./offchain-worker" }
pallet-example-kitchensink = { default-features = false, path = "./kitchensink" }
pallet-dev-mode = { default-features = false, path = "./dev-mode" }
pallet-example-split = { default-features = false, path = "./split" }
[features]
default = [ "std" ]
@@ -26,6 +27,7 @@ std = [
"pallet-example-offchain-worker/std",
"pallet-example-kitchensink/std",
"pallet-dev-mode/std",
"pallet-example-split/std",
]
try-runtime = [
"pallet-example-basic/try-runtime",
@@ -33,4 +35,5 @@ try-runtime = [
"pallet-example-offchain-worker/try-runtime",
"pallet-example-kitchensink/try-runtime",
"pallet-dev-mode/try-runtime",
]
"pallet-example-split/try-runtime",
]