-
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
Migrate JsonEncoder/Decoder macro to Scala 3 native macro. No more magnolia #929
base: series/2.x
Are you sure you want to change the base?
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. |
@@ -161,7 +161,7 @@ final class WithRetractReader(in: java.io.Reader) extends RetractReader with Aut | |||
private[zio] sealed trait RecordingReader extends RetractReader { | |||
def rewind(): Unit | |||
} | |||
private[zio] object RecordingReader { | |||
object RecordingReader { | |||
def apply(in: OneCharReader): RecordingReader = |
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.
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. |