Skip to content

Commit

Permalink
sqaush
Browse files Browse the repository at this point in the history
wip

make scala2 works

Delete some files

Add more tests

more tests

scala3 writer

fix

polish

clean up

Add helper function

scala3 macro

readers

fix bug

test pass

polish

polish

wip

fix

remove unused

Use ListBuffer to preserve orders

polish

Keep existing macros for bincompat

Keep formatting
  • Loading branch information
nox213 committed Dec 7, 2024
1 parent 976c5f9 commit 1ecc8df
Show file tree
Hide file tree
Showing 10 changed files with 1,036 additions and 130 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ trait MacroImplicits extends MacrosCommon { this: upickle.core.Types =>
def macroW[T]: Writer[T] = macro MacroImplicits.applyW[T]
def macroRW[T]: ReadWriter[T] = macro MacroImplicits.applyRW[ReadWriter[T]]

def macroR0[T, M[_]]: Reader[T] = macro internal.Macros.macroRImpl[T, M]
def macroW0[T, M[_]]: Writer[T] = macro internal.Macros.macroWImpl[T, M]
def macroR0[T, M[_]]: Reader[T] = macro internal.Macros2.macroRImpl[T, M]
def macroW0[T, M[_]]: Writer[T] = macro internal.Macros2.macroWImpl[T, M]
}

Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@ import upickle.implicits.{MacrosCommon, key}
import language.higherKinds
import language.existentials

/**
* This file is deprecated and remained here for binary compatibility.
* Please use upickle/implicits/src-2/upickle/implicits/internal/Macros2.scala instead.
*/

/**
* Implementation of macros used by uPickle to serialize and deserialize
* case classes automatically. You probably shouldn't need to use these
Expand Down Expand Up @@ -177,7 +182,7 @@ object Macros {

t.substituteTypes(typeParams, concrete)
} else {
val TypeRef(pref, sym, _) = typeOf[Seq[Int]]
val TypeRef(pref, sym, args) = typeOf[Seq[Int]]
import compat._
TypeRef(pref, sym, t.asInstanceOf[TypeRef].args)
}
Expand Down
Loading

0 comments on commit 1ecc8df

Please sign in to comment.