-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Integrate scale-info for type generation #2
Conversation
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.
lgtm! small grumble about inconsistent feature activation
frame-metadata/src/lib.rs
Outdated
if #[cfg(feature = "v12")] { | ||
mod v12; | ||
pub use v12::*; | ||
} else if #[cfg(feature = "v13")] { |
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.
} else if #[cfg(feature = "v13")] { | |
} | |
if #[cfg(feature = "v13")] { |
It should be possible to enable both v12
and `v13
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.
Right, we will need to reconsider the exports e.g. pub use v12::*;
because there will be some duplicates.
Can remove those and just have the user import the v12
v13
types as required?
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, let's avoid the reexports and be explicit about versions.
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.
Done, please have a look and merge if happy
#2) * Metadata supporting scale-info can be decoded and serialized in no_std (feature flag scale_info) * Changes from review: rename feature flag into full_derive * Changes from review: std implies full-derive * Changes from review: optimization Co-authored-by: echevrier <[email protected]>
* Metadata supporting scale-info can be decoded and serialized in no_std (#2) * Metadata supporting scale-info can be decoded and serialized in no_std (feature flag scale_info) * Changes from review: rename feature flag into full_derive * Changes from review: std implies full-derive * Changes from review: optimization Co-authored-by: echevrier <[email protected]> * split full_derive into decode and sered_codec features. (drop new Debug impls) * cargo fmt * rename serde_codec to serde_full * Prior to v14 everything was Debug. Are there any downsides? Unused debug impls will just get optimised away won't they? * rust fmt * Debug for the masses. Make it work for no_std * check all combos of features (if this plays well with ci then we should double up, doing the same again but target wasm32) * all wasm feature combos Co-authored-by: echevrier <[email protected]> Co-authored-by: echevrier <[email protected]>
Adds a
v13
feature which includesscale-info
type information.The
v13
metadata is still a work in progress and will likely require some further iteration as I work on the integration process with substrate.