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
[Enhancement] Throw an error when there are too many pallets #13763
Merged
Merged
Changes from 2 commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
3dd29d6
[Enhancement] Throw an error when there are too many pallets
ruseinov aff2a4e
fix ui test
ruseinov c9eb314
fix PR comments
ruseinov d0326c2
Update frame/support/procedural/src/construct_runtime/mod.rs
ruseinov e6563eb
Update frame/support/procedural/src/construct_runtime/mod.rs
ruseinov 3853129
".git/.scripts/commands/fmt/fmt.sh"
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
77 changes: 77 additions & 0 deletions
77
frame/support/test/tests/construct_runtime_ui/number_of_pallets_exceeds_tuple_size.rs
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 |
---|---|---|
@@ -0,0 +1,77 @@ | ||
use frame_support::construct_runtime; | ||
|
||
construct_runtime! { | ||
pub struct Runtime where | ||
UncheckedExtrinsic = UncheckedExtrinsic, | ||
Block = Block, | ||
NodeBlock = Block, | ||
{ | ||
System: system::{}, | ||
Pallet1: pallet2::{}, | ||
Pallet3: pallet4::{}, | ||
Pallet5: pallet6::{}, | ||
Pallet7: pallet8::{}, | ||
Pallet9: pallet10::{}, | ||
Pallet11: pallet12::{}, | ||
Pallet13: pallet14::{}, | ||
Pallet15: pallet16::{}, | ||
Pallet17: pallet18::{}, | ||
Pallet19: pallet20::{}, | ||
Pallet21: pallet22::{}, | ||
Pallet23: pallet24::{}, | ||
Pallet25: pallet26::{}, | ||
Pallet27: pallet28::{}, | ||
Pallet29: pallet30::{}, | ||
Pallet31: pallet32::{}, | ||
Pallet33: pallet34::{}, | ||
Pallet35: pallet36::{}, | ||
Pallet37: pallet38::{}, | ||
Pallet39: pallet40::{}, | ||
Pallet41: pallet42::{}, | ||
Pallet43: pallet44::{}, | ||
Pallet45: pallet46::{}, | ||
Pallet47: pallet48::{}, | ||
Pallet49: pallet50::{}, | ||
Pallet51: pallet52::{}, | ||
Pallet53: pallet54::{}, | ||
Pallet55: pallet56::{}, | ||
Pallet57: pallet58::{}, | ||
Pallet59: pallet60::{}, | ||
Pallet61: pallet62::{}, | ||
Pallet63: pallet64::{}, | ||
Pallet65: pallet66::{}, | ||
Pallet67: pallet68::{}, | ||
Pallet69: pallet70::{}, | ||
Pallet71: pallet72::{}, | ||
Pallet73: pallet74::{}, | ||
Pallet75: pallet76::{}, | ||
Pallet77: pallet78::{}, | ||
Pallet79: pallet80::{}, | ||
Pallet81: pallet82::{}, | ||
Pallet83: pallet84::{}, | ||
Pallet85: pallet86::{}, | ||
Pallet87: pallet88::{}, | ||
Pallet89: pallet90::{}, | ||
Pallet91: pallet92::{}, | ||
Pallet93: pallet94::{}, | ||
Pallet95: pallet96::{}, | ||
Pallet97: pallet98::{}, | ||
Pallet99: pallet100::{}, | ||
Pallet101: pallet102::{}, | ||
Pallet103: pallet104::{}, | ||
Pallet105: pallet106::{}, | ||
Pallet107: pallet108::{}, | ||
Pallet109: pallet110::{}, | ||
Pallet111: pallet112::{}, | ||
Pallet113: pallet114::{}, | ||
Pallet115: pallet116::{}, | ||
Pallet117: pallet118::{}, | ||
Pallet119: pallet120::{}, | ||
Pallet121: pallet122::{}, | ||
Pallet123: pallet124::{}, | ||
Pallet125: pallet126::{}, | ||
Pallet127: pallet128::{}, | ||
} | ||
} | ||
|
||
fn main() {} |
1 change: 1 addition & 0 deletions
1
frame/support/test/tests/construct_runtime_ui/number_of_pallets_exceeds_tuple_size.stderr
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 |
---|---|---|
@@ -0,0 +1 @@ | ||
12344 |
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.
Should include some information on how to fix this.
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.
yeah like an additional sentence like
format!("To increase this limit, enable the
tuples-{}feature of [crate]", next_highest_max).as_str()