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

Introduce derive macro attribute processing (Take 2) #130

Closed
wants to merge 0 commits into from

Conversation

johnhurt
Copy link

This pr includes all of the changes from @taiki-e 's pr from several years ago: #75. It looks like that pr lost traction, so I am hoping to give it new life because I would like to use the features it provides as well at the one new attribute I am introducing.

The original pr included the entire mechanism for processing derive-macro attributes, and utilizing them to allow users to

  • #[valuable(skip)] - fields that should not be included
  • #[valuable(transparent)] - omit types that simply wrap others
  • #[valuable(rename = "new_name")] - provide a replacement name

My only contribution to this is:

  • #[valuable(format = "{:#}")] - Allow for types that don't implement Valuable to included by inserting them a formatted string

I am happy to restructure or add to this pr to help it get incorporated it faster. I'm not sure why the original pr wasn't merged, but it still seems like a very useful feature. Thanks!

@taiki-e
Copy link
Member

taiki-e commented Aug 23, 2024

Thanks for the PR.

I honestly have no intention of reviewing this PR as is. The reason is that you compressed everything into one commit, which makes it very difficult to review the specific diff with my PR and requires the entire review to be done from the beginning.

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