TedDriggs / darling

A Rust proc-macro attribute parser
MIT License
983 stars 66 forks source link

Improve `FromMeta` implementation for enums #260

Closed davidsemakula closed 8 months ago

davidsemakula commented 9 months ago

Improves FromMeta implementation for enums

davidsemakula commented 8 months ago

I'm working on implementing support for #[darling(word)] syntax

davidsemakula commented 8 months ago

LMK if I should squash the commits 🙂

TedDriggs commented 8 months ago

LMK if I should squash the commits 🙂

I think we're very close to the squash point.

davidsemakula commented 8 months ago

I'll work on the changelog and readme updates tomorrow.

  1. Deciding if this is the best name for this attribute. I thought it was originally (and I still don't think default is appropriate), but I am now worrying that word is too cryptic.

Agreed, default would be confusing and word is a bit cryptic, but I don't have a better suggestion at this point. May be the more verbose from_word?

davidsemakula commented 8 months ago

I updated the changelog. But I don't think I can update the readme to introduce and describe #[darling(word)] succinctly, can you take that part? I'm guessing it should be a bullet point under Features?

TedDriggs commented 8 months ago

In the absence of a README entry, we could consider an example that includes several features of a heterogeneous enum. Maybe replicate one of the tests over to the examples and add some comments to show what's going on?

davidsemakula commented 8 months ago

Sounds good, I'll work on an example 👍

davidsemakula commented 8 months ago

In the absence of a README entry, we could consider an example that includes several features of a heterogeneous enum. Maybe replicate one of the tests over to the examples and add some comments to show what's going on?

Added an example.

davidsemakula commented 8 months ago

Pinging @TedDriggs

davidsemakula commented 8 months ago

@TedDriggs can we get this published on crates.io when you have some time? If I can do anything to help that process along, LMK 🙂

TedDriggs commented 8 months ago

Will do on Monday; out of town this weekend


From: David Semakula @.> Sent: Thursday, January 25, 2024 11:13:50 AM To: TedDriggs/darling @.> Cc: Ted Driggs @.>; Mention @.> Subject: Re: [TedDriggs/darling] Improve FromMeta implementation for enums (PR #260)

@TedDriggshttps://github.com/TedDriggs can we get this published on crates.io when you have some time? If I can do anything to help that process along, LMK 🙂

— Reply to this email directly, view it on GitHubhttps://github.com/TedDriggs/darling/pull/260#issuecomment-1910825716, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ABEVHRZWVZUL6IB6CGXY5STYQKVG5AVCNFSM6AAAAABBFFQZJCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMJQHAZDKNZRGY. You are receiving this because you were mentioned.Message ID: @.***>

TedDriggs commented 7 months ago

v0.20.4 is now live.

davidsemakula commented 7 months ago

Awesome! Thanks for taking the time to review this PR 🙂