Non-clashing module attributes
lasseebert opened this issue · 3 comments
lasseebert commented
I just got hit by the auto generated module attributes (@fields
, @types
and @keys_to_enforce
).
I was changing an existing defstruct
to use TypedStruct, but I already had a module attribute called @types
. It took me a while to figure out what went wrong :)
ExUnit and Ecto both solves this by prepending the library name to the module attributes.
Perhaps typed_struct could do the same?
I'd be happy to do a PR.
ejpcmac commented
Thank you for your reports by the way!
lasseebert commented
Awesome. Thanks for the quick response and fix 😊