Skip to content
This repository was archived by the owner on Jan 24, 2025. It is now read-only.

Commit 363e888

Browse files
authored
Use com.softwaremill.magnolia1_2 instead of com.propensive (#378)
* Use com.softwaremill.magnolia1_2 instead of com.propensive * migrate import packages
1 parent be70e10 commit 363e888

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

build.sbt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ lazy val core = (projectMatrix in file("core"))
6060
)
6161
case _ =>
6262
Seq(
63-
"com.propensive" %%% "magnolia" % "0.17.0",
63+
"com.softwaremill.magnolia1_2" %%% "magnolia" % "1.1.2",
6464
"org.scala-lang" % "scala-reflect" % scalaVersion.value % Provided
6565
)
6666
}

core/src/main/scala-2/com/softwaremill/diffx/DiffCompanionMacro.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
package com.softwaremill.diffx
22

33
import com.softwaremill.diffx.generic.DiffMagnoliaDerivation
4-
import magnolia.Magnolia
4+
import magnolia1.Magnolia
55

66
trait DiffCompanionMacro extends DiffMagnoliaDerivation {
77
def derived[T]: Diff[T] = macro Magnolia.gen[T]

core/src/main/scala-2/com/softwaremill/diffx/generic/DiffMagnoliaDerivation.scala

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
package com.softwaremill.diffx.generic
22

33
import com.softwaremill.diffx.{Diff, DiffContext, DiffResultObject, DiffResultValue, ModifyPath, nullGuard}
4-
import magnolia._
4+
import magnolia1._
55

66
import scala.collection.immutable.ListMap
77

88
trait DiffMagnoliaDerivation {
99
type Typeclass[T] = Diff[T]
1010

11-
def combine[T](ctx: ReadOnlyCaseClass[Typeclass, T]): Diff[T] = { (left: T, right: T, context: DiffContext) =>
11+
def join[T](ctx: ReadOnlyCaseClass[Typeclass, T]): Diff[T] = { (left: T, right: T, context: DiffContext) =>
1212
nullGuard(left, right) { (left, right) =>
1313
val map = ListMap(ctx.parameters.map { p =>
1414
val lType = p.dereference(left)
@@ -25,10 +25,10 @@ trait DiffMagnoliaDerivation {
2525
}
2626
}
2727

28-
def dispatch[T](ctx: SealedTrait[Typeclass, T]): Diff[T] = { (left: T, right: T, context: DiffContext) =>
28+
def split[T](ctx: SealedTrait[Typeclass, T]): Diff[T] = { (left: T, right: T, context: DiffContext) =>
2929
nullGuard(left, right) { (left, right) =>
30-
val lType = ctx.dispatch(left)(a => a)
31-
val rType = ctx.dispatch(right)(a => a)
30+
val lType = ctx.split(left)(a => a)
31+
val rType = ctx.split(right)(a => a)
3232
if (lType == rType) {
3333
lType.typeclass(
3434
lType.cast(left),

core/src/main/scala-2/com/softwaremill/diffx/generic/MagnoliaDerivedMacro.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
package com.softwaremill.diffx.generic
22

33
import com.softwaremill.diffx.Derived
4-
import magnolia.Magnolia
4+
import magnolia1.Magnolia
55

66
object MagnoliaDerivedMacro {
77

0 commit comments

Comments
 (0)