-
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
Add enumeratum-quill #170
Add enumeratum-quill #170
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Do you mind fixing the merge conflict with master?
) | ||
} | ||
) | ||
lazy val enumeratumQuillJs = enumeratumQuill.js |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TIL: Quill works with ScalaJS O_o
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Haha I was shocked as well
Just discovered that all Quill contexts don't have an Encoder/Decoder for |
I've added a note on them in the |
1 similar comment
|
||
ctx.run(query[Shirt]).foreach(println) | ||
``` | ||
- Note that an explicit cast to the `ValueEnumEntry` abstract class (eg. `ShirtSize.Small: ShirtSize`) is required when binding hardcoded `ValueEnumEntry`s |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No big deal; but this isn't an explicit cast; just an explicit type annotation :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, I knew that it wasn't an explicit cast (asInstanceOf
), but I forgot what it was called, thanks
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually, if we were to be pedantic, I guess this should be called a Type Ascription instead of a Type Annotation?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, you missed out on one of the "explicit cast"s. I've opened a PR (#172) to fix both.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Re-reviewing, still LGTM :) Will merge later today.
Hey thanks for this ! Just merged and released it as 1.5.12. It should be on Maven Central soonish. Just a note: apparently Quill is only 2.11 + so 2.10 isn't supported :) Great work and thanks again! |
Oops, I forgot to run |
As mentioned in #163.
Adds
QuillEnum
trait to automatically convertEnumEntry
s to/from theirentryName
.Adds
QuillValueEnum
trait to automatically convertValueEnumEntry
s to/from theirvalue
s.I wasn't sure what to put for the
version
, so I left it as0.1.0-SNAPSHOT
.