-
Notifications
You must be signed in to change notification settings - Fork 149
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
Avoid the use of toString
for enumEntry
?
#351
Comments
|
It works, but it's pretty manual (one has to change the base trait of all their enums). Ideally it wouldn't require source-level changes. |
I would also vote for some kind of refactor that the This simple thing can break Enumeratum completelly:
|
@snilard I'd vote for macros. |
Currently enumeratum has this:
and it works in normal conditions, but I'd argue that
toString
should not be relied upon.entryName
can affect serialization andtoString
is pretty arbitrary - we made this assumption in better-tostring, and it turns out to be incompatible with enumeratum. We have a workaround, but it's pretty inconvenient.What do you think about the possibility of doing something else? i.e. getting the entry name based on the actual source names of the enum members (derived at compile time).
The text was updated successfully, but these errors were encountered: