This repository was 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.7k
[Enhancement] Throw an error when there are too many pallets #13763
Merged
Merged
Changes from 1 commit
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 hidden or 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
224 changes: 158 additions & 66 deletions
224
frame/support/test/tests/construct_runtime_ui/number_of_pallets_exceeds_tuple_size.rs
This file contains hidden or 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
62 changes: 61 additions & 1 deletion
62
frame/support/test/tests/construct_runtime_ui/number_of_pallets_exceeds_tuple_size.stderr
This file contains hidden or 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 |
|---|---|---|
| @@ -1 +1,61 @@ | ||
| 12344 | ||
| error: The number of pallets exceeds the maximum number of tuple elements. To increase this limit, enable the tuples-96 feature of [frame_support]. | ||
| --> tests/construct_runtime_ui/number_of_pallets_exceeds_tuple_size.rs:50:2 | ||
| | | ||
| 50 | pub struct Runtime where | ||
| | ^^^ | ||
|
|
||
| error[E0412]: cannot find type `RuntimeCall` in this scope | ||
| --> tests/construct_runtime_ui/number_of_pallets_exceeds_tuple_size.rs:18:64 | ||
| | | ||
| 18 | pub type UncheckedExtrinsic = generic::UncheckedExtrinsic<u32, RuntimeCall, Signature, ()>; | ||
| | ^^^^^^^^^^^ not found in this scope | ||
| | | ||
| help: you might be missing a type parameter | ||
| | | ||
| 18 | pub type UncheckedExtrinsic<RuntimeCall> = generic::UncheckedExtrinsic<u32, RuntimeCall, Signature, ()>; | ||
| | +++++++++++++ | ||
|
|
||
| error[E0412]: cannot find type `Runtime` in this scope | ||
| --> tests/construct_runtime_ui/number_of_pallets_exceeds_tuple_size.rs:20:25 | ||
| | | ||
| 20 | impl pallet::Config for Runtime {} | ||
| | ^^^^^^^ not found in this scope | ||
|
|
||
| error[E0412]: cannot find type `Runtime` in this scope | ||
| --> tests/construct_runtime_ui/number_of_pallets_exceeds_tuple_size.rs:22:31 | ||
| | | ||
| 22 | impl frame_system::Config for Runtime { | ||
| | ^^^^^^^ not found in this scope | ||
|
|
||
| error[E0412]: cannot find type `RuntimeOrigin` in this scope | ||
| --> tests/construct_runtime_ui/number_of_pallets_exceeds_tuple_size.rs:24:23 | ||
| | | ||
| 24 | type RuntimeOrigin = RuntimeOrigin; | ||
| | ^^^^^^^^^^^^^ help: you might have meant to use the associated type: `Self::RuntimeOrigin` | ||
|
|
||
| error[E0412]: cannot find type `RuntimeCall` in this scope | ||
| --> tests/construct_runtime_ui/number_of_pallets_exceeds_tuple_size.rs:27:21 | ||
| | | ||
| 27 | type RuntimeCall = RuntimeCall; | ||
| | ^^^^^^^^^^^ help: you might have meant to use the associated type: `Self::RuntimeCall` | ||
|
|
||
| error[E0412]: cannot find type `RuntimeEvent` in this scope | ||
| --> tests/construct_runtime_ui/number_of_pallets_exceeds_tuple_size.rs:33:22 | ||
| | | ||
| 33 | type RuntimeEvent = RuntimeEvent; | ||
| | ^^^^^^^^^^^^ help: you might have meant to use the associated type: `Self::RuntimeEvent` | ||
|
|
||
| error[E0412]: cannot find type `PalletInfo` in this scope | ||
| --> tests/construct_runtime_ui/number_of_pallets_exceeds_tuple_size.rs:39:20 | ||
| | | ||
| 39 | type PalletInfo = PalletInfo; | ||
| | ^^^^^^^^^^ | ||
| | | ||
| help: you might have meant to use the associated type | ||
| | | ||
| 39 | type PalletInfo = Self::PalletInfo; | ||
| | ~~~~~~~~~~~~~~~~ | ||
| help: consider importing this trait | ||
| | | ||
| 1 | use frame_support::traits::PalletInfo; | ||
| | |
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.
Uh oh!
There was an error while loading. Please reload this page.