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
Rewrite impl_runtime_apis!
and decl_runtime_apis!
as proc-macro
#1174
Merged
Conversation
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 also renames `ClientWithApi` into `RuntimeApi`.
gnunicorn
approved these changes
Nov 29, 2018
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.
Great Work. It is pretty mind-bending to review in between, but it looks pretty sound to me. Just some minor changes requested.
gavofyork
reviewed
Nov 30, 2018
fn inherent_extrinsics(data: runtime_primitives::InherentData) -> Vec<<Block as BlockT>::Extrinsic> { | ||
let mut inherent = Vec::new(); | ||
|
||
inherent.extend( |
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.
manual amalgamation code?
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, I reverted in parts my macro here. I ran into some problems. As I will need to revisit the InherentData
stuff anyway, I did not wanted to waste too much time on this topic in this pr.
liuchengxu
pushed a commit
to liuchengxu/substrate
that referenced
this pull request
May 31, 2023
Temporary banning for unreachable peers
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
This is a complete rewrite of both macros as
proc-macros
.Using
proc-macro
brings us certain advantages, like better error reporting and a more readable implementation.