lloydmeta / enumeratum

A type-safe, reflection-free, powerful enumeration implementation for Scala with exhaustive pattern match warnings and helpful integrations.
MIT License
1.19k stars 148 forks source link

Update scala 3 macro to support a hierarchy of sealed traits #371

Closed coreywoodfield closed 1 year ago

coreywoodfield commented 1 year ago

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 inheriting sealed trait

codecov-commenter commented 1 year ago

Codecov Report

Merging #371 (9792830) into master (74a7b36) will not change coverage. The diff coverage is n/a.

:exclamation: 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           
coreywoodfield commented 1 year ago

I added a test. It fails if I run coreJVM / test as-is and passes if I run coreJVM / test after settings useLocalVersion in build.sbt to true

lloydmeta commented 1 year ago

Pulled this branch and merged in master locally and ran some basic tests...seems to be good so merging now.

lloydmeta commented 1 year ago

Thanks for this btw, it has been released as part of https://github.com/lloydmeta/enumeratum/releases/tag/macros-1.6.4