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

Non-clashing module attributes #15

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
bug
Projects

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 bug label May 27, 2020
@ejpcmac ejpcmac added this to To do in v0.2.0 via automation 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!

@ejpcmac ejpcmac moved this from To do to In progress in v0.2.0 May 27, 2020
@ejpcmac ejpcmac moved this from In progress to Done in v0.2.0 May 27, 2020
@lasseebert
Copy link
Author

lasseebert commented May 27, 2020

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
bug
Projects
No open projects
v0.2.0
  
Done
Development

No branches or pull requests

2 participants