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
construct_runtime auto pallet parts: allow pallets to expand { Event, Call... }
automatically.
#6494
Closed
Closed
construct_runtime auto pallet parts: allow pallets to expand { Event, Call... }
automatically.
#6494
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
8e71a22
macro modification
gui1117 ebcebfd
doc
gui1117 8700d74
add tests
gui1117 164722c
removed unused
gui1117 a9c30ac
Merge remote-tracking branch 'origin/master' into gui-automatic-const…
gui1117 41439ec
ensure module are expanded through rust types
gui1117 c714a72
remove need for local_macro and multiple pallet per crate
gui1117 0bee948
fix ui test
gui1117 2a62399
allow multiple call to impl_outer_config
gui1117 6445d9a
fix wasm build
gui1117 b26ef34
add license and fix doc
gui1117 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
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
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.
I see this pattern in the expansions of derive macros of codec as well, what is the purpose? is the keyword
__hidden_use_unchecked_extrinsic
used anywhere now?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.
no,
keyword __hidden_use_unchecked_extrinsic
is not used anywhere, warpping in const is a pattern used by many derive macro, for instance serde.I think the main advantage is that it makes
type __hidden_use_unchecked_extrinsic
unavailable in doc and rust error will not recommand it.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.
But if the type alias is not even accessible and used anywhere, I don't see how it is used.
For example I've this and it makes sense:
but something like:
I don't get.
Unless is
__hidden_use_unchecked_extrinsic
used in the other branch? Asking because I couldn't find any usage here.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.
this is just to
// Prevent UncheckedExtrinsic to print unused warning.
so I have
const _: () = { #[allow(unused)] type __unused_alias = Foo; }
UncheckedExtrinsic is unused if there is no inherent.