Skip to content

Close #1176 - Support Scala3 enum - #1377

Open
cchantep wants to merge 1 commit into
playframework:mainfrom
cchantep:feature/scala3-enum
Open

Close #1176 - Support Scala3 enum#1377
cchantep wants to merge 1 commit into
playframework:mainfrom
cchantep:feature/scala3-enum

Conversation

@cchantep

Copy link
Copy Markdown
Member

Pull Request Checklist

  • Have you read through the contributor guidelines?
  • Have you squashed your commits?
  • Have you added copyright headers to new files?
  • Have you updated the documentation?
  • Have you added tests for any changed functionality?

Purpose

Support Scala 3 enum for Reads/Writes/Format.

Background Context

There is a previous PR #1176.
I think there is another approach about that, more consistent with the existing API/codebase.

  • Keep implementation separate from complex macros in JsMacroImpl
  • Keep API separate in JsValueMacros as for Value classes
  • Inspired by [[https://github.com/lloydmeta/enumeratum/blob/master/enumeratum-reactivemongo-bson/src/main/scala/enumeratum/EnumHandler.scala enumeratum]]
  • Inspired by [[https://github.com/ReactiveMongo/ReactiveMongo-BSON/blob/master/api/src/main/scala-3/EnumHelper.scala ReactiveMongo-BSON]]

References

Are there any relevant issues / PRs / mailing lists discussions?

#1176

@cchantep
cchantep force-pushed the feature/scala3-enum branch from c5c7c9b to 9a259cf Compare August 17, 2026 20:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant