This repository has been archived by the owner on Nov 15, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Automatic pallet parts in construct_runtime #9681
Merged
+1,335
−218
Merged
Changes from 29 commits
Commits
Show all changes
53 commits
Select commit
Hold shift + click to select a range
5c8e299
implement automatic parts
gui1117 62afa97
ui tests
gui1117 2dc4412
rename
gui1117 a790517
Merge remote-tracking branch 'origin/master' into gui-construct_runti…
gui1117 5bec9dd
remove unnecessary exclude
gui1117 8c9c19b
better doc
gui1117 4b405a3
better doc
gui1117 afde346
fix genesis config
gui1117 eebea7b
fix UI tests
gui1117 a910351
fix UI test
gui1117 ea68d3a
Merge remote-tracking branch 'origin/master' into gui-construct_runti…
gui1117 6352dfd
Revert "fix UI test"
gui1117 480af69
Merge remote-tracking branch 'origin/master' into gui-construct_runti…
gui1117 4127c1e
implemented used_parts
gui1117 aaac25a
Update frame/support/procedural/src/construct_runtime/mod.rs
gui1117 4fb77ab
doc + fmt
gui1117 a2442a4
Update frame/support/procedural/src/construct_runtime/parse.rs
gui1117 534f293
add doc in the macro
gui1117 0c72e96
Merge remote-tracking branch 'origin/master' into gui-construct_runti…
gui1117 6871c71
remove yet some more parts
gui1117 3d463f5
fix ui test
gui1117 62a34d5
more determnistic error message + fix ui tests
gui1117 32ab5a4
fix ui test
gui1117 318c26c
Apply suggestions from code review
gui1117 4b1b178
do refactor + fix ui tests
gui1117 134b8df
Merge remote-tracking branch 'origin/master' into gui-construct_runti…
gui1117 e571e9e
fmt
gui1117 ebb14fb
fix test
gui1117 5ea0535
fix test
gui1117 5787ad6
fix ui test
gui1117 03cb587
Apply suggestions from code review
gui1117 89cf841
refactor
gui1117 871b8bf
Merge remote-tracking branch 'origin/master' into gui-construct_runti…
gui1117 25811d7
remove even more part in node-runtime
gui1117 cdb7151
fix test
gui1117 8b39dc0
Add flow chart for the construct_runtime! execution flow
KiChjang 41baa40
Fix typo
KiChjang b9ade81
Ignore snippets that don't contain code
KiChjang e5e6adc
Merge remote-tracking branch 'origin/master' into gui-construct_runti…
KiChjang 3c34573
Refactor some code in expand_after
KiChjang a22cf5b
Rename expand_after to match_and_insert
KiChjang b381c21
cargo fmt
KiChjang 8dc3dab
Fix rename
KiChjang ffc053f
Remove frame_support argument to construct_runtime_parts
KiChjang d7e14b4
Make use of tt-call to simplify intermediate expansions
KiChjang eda408b
cargo fmt
KiChjang 67d9cfa
Update match_and_insert documentation
KiChjang 2584262
Reset cursor to 0 when no matching patterns are found
KiChjang c10400f
Reorder struct fields on MatchAndInsertDef
KiChjang cfe4d54
Add test for dependency renames and fix frame-support import
KiChjang 8964094
Add more doc comments
KiChjang 9681c77
Update frame/support/test/compile_pass/src/lib.rs
KiChjang b032085
Merge branch 'master' into gui-construct_runtime-auto
shawntabrizi File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1237,47 +1237,47 @@ construct_runtime!( | |
NodeBlock = node_primitives::Block, | ||
UncheckedExtrinsic = UncheckedExtrinsic | ||
{ | ||
System: frame_system::{Pallet, Call, Config, Storage, Event<T>}, | ||
Utility: pallet_utility::{Pallet, Call, Event}, | ||
Babe: pallet_babe::{Pallet, Call, Storage, Config, ValidateUnsigned}, | ||
Timestamp: pallet_timestamp::{Pallet, Call, Storage, Inherent}, | ||
Authorship: pallet_authorship::{Pallet, Call, Storage, Inherent}, | ||
Indices: pallet_indices::{Pallet, Call, Storage, Config<T>, Event<T>}, | ||
Balances: pallet_balances::{Pallet, Call, Storage, Config<T>, Event<T>}, | ||
TransactionPayment: pallet_transaction_payment::{Pallet, Storage}, | ||
ElectionProviderMultiPhase: pallet_election_provider_multi_phase::{Pallet, Call, Storage, Event<T>, ValidateUnsigned}, | ||
Staking: pallet_staking::{Pallet, Call, Config<T>, Storage, Event<T>}, | ||
System: frame_system, | ||
Utility: pallet_utility, | ||
Babe: pallet_babe, | ||
Timestamp: pallet_timestamp, | ||
Authorship: pallet_authorship, | ||
Indices: pallet_indices, | ||
Balances: pallet_balances, | ||
TransactionPayment: pallet_transaction_payment, | ||
ElectionProviderMultiPhase: pallet_election_provider_multi_phase, | ||
Staking: pallet_staking, | ||
Session: pallet_session::{Pallet, Call, Storage, Event, Config<T>}, | ||
Democracy: pallet_democracy::{Pallet, Call, Storage, Config<T>, Event<T>}, | ||
Council: pallet_collective::<Instance1>::{Pallet, Call, Storage, Origin<T>, Event<T>, Config<T>}, | ||
TechnicalCommittee: pallet_collective::<Instance2>::{Pallet, Call, Storage, Origin<T>, Event<T>, Config<T>}, | ||
Elections: pallet_elections_phragmen::{Pallet, Call, Storage, Event<T>, Config<T>}, | ||
TechnicalMembership: pallet_membership::<Instance1>::{Pallet, Call, Storage, Event<T>, Config<T>}, | ||
Grandpa: pallet_grandpa::{Pallet, Call, Storage, Config, Event, ValidateUnsigned}, | ||
Treasury: pallet_treasury::{Pallet, Call, Storage, Config, Event<T>}, | ||
Contracts: pallet_contracts::{Pallet, Call, Storage, Event<T>}, | ||
Sudo: pallet_sudo::{Pallet, Call, Config<T>, Storage, Event<T>}, | ||
ImOnline: pallet_im_online::{Pallet, Call, Storage, Event<T>, ValidateUnsigned, Config<T>}, | ||
AuthorityDiscovery: pallet_authority_discovery::{Pallet, Config}, | ||
Offences: pallet_offences::{Pallet, Storage, Event}, | ||
Democracy: pallet_democracy, | ||
Council: pallet_collective::<Instance1>, | ||
TechnicalCommittee: pallet_collective::<Instance2>, | ||
Elections: pallet_elections_phragmen, | ||
TechnicalMembership: pallet_membership::<Instance1>, | ||
Grandpa: pallet_grandpa, | ||
Treasury: pallet_treasury, | ||
Contracts: pallet_contracts, | ||
Sudo: pallet_sudo, | ||
ImOnline: pallet_im_online, | ||
AuthorityDiscovery: pallet_authority_discovery, | ||
Offences: pallet_offences, | ||
Historical: pallet_session_historical::{Pallet}, | ||
RandomnessCollectiveFlip: pallet_randomness_collective_flip::{Pallet, Storage}, | ||
Identity: pallet_identity::{Pallet, Call, Storage, Event<T>}, | ||
RandomnessCollectiveFlip: pallet_randomness_collective_flip, | ||
Identity: pallet_identity, | ||
Society: pallet_society::{Pallet, Call, Storage, Event<T>, Config<T>}, | ||
Recovery: pallet_recovery::{Pallet, Call, Storage, Event<T>}, | ||
Vesting: pallet_vesting::{Pallet, Call, Storage, Event<T>, Config<T>}, | ||
Scheduler: pallet_scheduler::{Pallet, Call, Storage, Event<T>}, | ||
Proxy: pallet_proxy::{Pallet, Call, Storage, Event<T>}, | ||
Multisig: pallet_multisig::{Pallet, Call, Storage, Event<T>}, | ||
Recovery: pallet_recovery, | ||
Vesting: pallet_vesting, | ||
Scheduler: pallet_scheduler, | ||
Proxy: pallet_proxy, | ||
Multisig: pallet_multisig, | ||
Bounties: pallet_bounties::{Pallet, Call, Storage, Event<T>}, | ||
Tips: pallet_tips::{Pallet, Call, Storage, Event<T>}, | ||
Assets: pallet_assets::{Pallet, Call, Storage, Event<T>}, | ||
Mmr: pallet_mmr::{Pallet, Storage}, | ||
Lottery: pallet_lottery::{Pallet, Call, Storage, Event<T>}, | ||
Gilt: pallet_gilt::{Pallet, Call, Storage, Event<T>, Config}, | ||
Uniques: pallet_uniques::{Pallet, Call, Storage, Event<T>}, | ||
TransactionStorage: pallet_transaction_storage::{Pallet, Call, Storage, Inherent, Config<T>, Event<T>}, | ||
BagsList: pallet_bags_list::{Pallet, Call, Storage, Event<T>}, | ||
Tips: pallet_tips, | ||
Assets: pallet_assets, | ||
Mmr: pallet_mmr, | ||
Lottery: pallet_lottery, | ||
Gilt: pallet_gilt, | ||
Uniques: pallet_uniques, | ||
TransactionStorage: pallet_transaction_storage, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ❤️ This looks a lot cleaner. |
||
BagsList: pallet_bags_list, | ||
} | ||
); | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
The
<T>
generic here still makes me a bit sad, but that's really what #8743 aims to solve.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.
yes but I expect nobody to use this syntax anymore once all pallet use
pallet
macro.maybe we can explicit whitelist syntax like
use_parts
as well.