-
Notifications
You must be signed in to change notification settings - Fork 100
feat!: introduce attrs setting
#949
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
base: main
Are you sure you want to change the base?
feat!: introduce attrs setting
#949
Conversation
ahl
left a comment
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 looks good; do you have a proposal for how we test it?
typify-impl/src/util.rs
Outdated
| pub(crate) fn type_patch( | ||
| type_space: &TypeSpace, | ||
| type_name: String, | ||
| ) -> (String, BTreeSet<String>, BTreeSet<String>) { |
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.
Maybe at this point we should have a struct with named fields..
|
I'll update the documentation, add it as an option to the CLI, clean up the code, and possibly add some tests shortly. |
attrs settingattrs setting
|
|
||
| /// Add an additional derive macro to apply to all defined types. | ||
| #[arg(short, long = "additional-derive", value_name = "derive")] | ||
| #[arg(short = 'd', long = "additional-derive", value_name = "derive")] |
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.
Updated the shorthand for the additional-derive option to resolve the conflict with the new additional-attr option. This is a breaking change.
This PR introduces a new
attrssetting that can be used to apply attributes to generated types.Supersedes #707