Skip to content
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

Add --derives_for_type to cli #706

Closed

Conversation

fmiguelgarcia
Copy link
Contributor

Description

Add --derive_for_type to the cli

Example

subxt codegen \
   --derive Clone \
   --derive PartialEq \
   --derive Eq \
   --derive_for_type my_module::my_type_1=serde::Serialize \
   --derive_for_type my_module::my_type_1=serde::Deserialize \
   --derive_for_type my_module::my_type_1=Default \
   --url http://localhost:9933 \
   | rustfmt --edition=2021 --emit=stdout > api.rs

@cla-bot-2021
Copy link

cla-bot-2021 bot commented Nov 4, 2022

User @migroslinx, please sign the CLA here.

@mordamax
Copy link

mordamax commented Nov 7, 2022

@fmiguelgarcia @migroslinx as discussed in matrix - in order that CLA signature works - the committer and the signer should be the same account. Currently seems like you committed under @migroslinx, but trying to sign with @fmiguelgarcia

Either sign as @migroslinx or re-create a commit under @fmiguelgarcia

/// Additional derives for a given type.
///
/// Example `--derive_for_type my_module::my_type=serde::Serialize`.
#[structopt(long = "derive_for_type", parse(try_from_str = derive_for_type_parser))]
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit; can we go with derive-for-type please (ie dashes instead of underscores) :)

@fmiguelgarcia
Copy link
Contributor Author

Superseded by PR 708

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants