Skip to content

Conversation

@ericszentivanyi
Copy link
Contributor

@ericszentivanyi ericszentivanyi commented Dec 31, 2025

This PR introduces a new attrs setting that can be used to apply attributes to generated types.

Supersedes #707

Copy link
Collaborator

@ahl ahl left a 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?

pub(crate) fn type_patch(
type_space: &TypeSpace,
type_name: String,
) -> (String, BTreeSet<String>, BTreeSet<String>) {
Copy link
Collaborator

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..

@ericszentivanyi ericszentivanyi marked this pull request as draft January 4, 2026 21:14
@ericszentivanyi
Copy link
Contributor Author

I'll update the documentation, add it as an option to the CLI, clean up the code, and possibly add some tests shortly.

@ericszentivanyi ericszentivanyi changed the title feat: introduce attrs setting feat!: introduce attrs setting Jan 4, 2026
@ericszentivanyi ericszentivanyi marked this pull request as ready for review January 4, 2026 22:49

/// 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")]
Copy link
Contributor Author

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.

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.

2 participants