Migrate JsonEncoder/Decoder macro to Scala 3 native macro. No more magnolia#929
Migrate JsonEncoder/Decoder macro to Scala 3 native macro. No more magnolia#929987Nabil wants to merge 4 commits intozio:series/2.xfrom
Conversation
987Nabil
commented
Apr 12, 2023
- annotation handling
- decoders for recursive data structures
- annotation handling - decoders for recursive data structures
|
Still needs some refactoring. But it would be nice, if one could approve the workflows. |
| } | ||
| private[zio] object RecordingReader { | ||
| object RecordingReader { | ||
| def apply(in: OneCharReader): RecordingReader = |
There was a problem hiding this comment.
The macro basically inlines the code that calls this apply. Therefore we get a compile time error if it is package private.
|
I thought one could extract the common macro code to some helper. But this does not seem to work since the imports of the |
b387a71 to
8e40d52
Compare
|
@987Nabil Looks great! Can you add some more tests for this under Scala 3 so we can be more assured the derivation is working correctly? |
|
There are actually a lot of shared tests. I think most cases are covered. But I can take a look if I find something missing. |
|
fyi: The benchmark does not compile. Did not find the time yet to take a deeper look. |