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 --derive-for-type to cli #708

Merged
merged 4 commits into from
Nov 23, 2022

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 8, 2022

User @fmiguelgarcia, please sign the CLA here.

@jsdw
Copy link
Collaborator

jsdw commented Nov 8, 2022

Ah, I didn't notice but your branch seems to be lagging behind master somewhat. Please update to the latest master and reapply your changes in the relevant place and it should be good to go; logic wise it looks sound :)

@fmiguelgarcia
Copy link
Contributor Author

@jsdw done :)

Copy link
Collaborator

@jsdw jsdw left a comment

Choose a reason for hiding this comment

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

Works for me; thank you for your contribution!

Copy link
Collaborator

@lexnv lexnv left a comment

Choose a reason for hiding this comment

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

LGTM! Thanks for contributing!

@jsdw
Copy link
Collaborator

jsdw commented Nov 10, 2022

You just need to run a cargo clippy --all-targets and fix the error (or look at the CI output from that job) and this should be good to go!

@jsdw
Copy link
Collaborator

jsdw commented Nov 10, 2022

Ah, no, it's just a dumb unrelated clippy error; I'll have a look tomorrow!

@fmiguelgarcia
Copy link
Contributor Author

@jsdw I removed some clippy warnings. Let's see it CI passes now.

@niklasad1
Copy link
Member

@fmiguelgarcia should be sufficient to merge to master to get rid of clippy stuff :P

@jsdw jsdw merged commit a80d6cf into paritytech:master Nov 23, 2022
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.

5 participants