Skip to content

Non-clashing module attributes #15

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

Closed
lasseebert opened this issue May 27, 2020 · 3 comments
Closed

Non-clashing module attributes #15

lasseebert opened this issue May 27, 2020 · 3 comments
Labels
T:Bug Type: Bug

Comments

@lasseebert
Copy link

lasseebert commented May 27, 2020

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 ejpcmac added the T:Bug Type: Bug label May 27, 2020
@ejpcmac
Copy link
Owner

ejpcmac commented May 27, 2020

I’m working on #14 right now, I’ll solve this one right after.

@ejpcmac
Copy link
Owner

ejpcmac commented May 27, 2020

Thank you for your reports by the way!

@lasseebert
Copy link
Author

Awesome. Thanks for the quick response and fix 😊

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T:Bug Type: Bug
Projects
Status: Solved
Development

No branches or pull requests

2 participants