-
Notifications
You must be signed in to change notification settings - Fork 150
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
Update scala 3 macro to support a hierarchy of sealed traits #371
Conversation
Codecov Report
❗ Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more. @@ Coverage Diff @@
## master #371 +/- ##
=======================================
Coverage 85.52% 85.52%
=======================================
Files 65 65
Lines 518 518
Branches 31 31
=======================================
Hits 443 443
Misses 75 75 |
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.
Thanks for taking a stab at this.
Regarding tests, it might be good to add something to
class ValueEnumSpec extends AnyFunSpec with Matchers with ValueEnumHelpers { |
possibly by adding a sealed trait enum definition in enumeratum-core/src/test/scala/enumeratum/values
fa46ab2
to
9792830
Compare
I added a test. It fails if I run |
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 thanks ! I'll merge this once I have some time to push out releases.
Re: having to set the "use local version" flag: that's expected :)
Pulled this branch and merged in master locally and ran some basic tests...seems to be good so merging now. |
Thanks for this btw, it has been released as part of https://github.com/lloydmeta/enumeratum/releases/tag/macros-1.6.4 |
This fixes #368. I wasn't sure how to add/update tests, but I did test it in a sample project locally, and it works as expected. It finds all the instances of the base
sealed trait
and all the instances of the inheritingsealed trait