diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c9eed7d..d19c616 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -13,10 +13,9 @@ jobs: - uses: actions/checkout@v4 - id: set-scala-versions run: | - scala212=$(grep "scala2.12" project/Dependencies.scala | sed -E 's/.*= //') scala213=$(grep "scala2.13" project/Dependencies.scala | sed -E 's/.*= //') scala3=$(grep "scala3" project/Dependencies.scala | sed -E 's/.*= //') - echo "versions={\"scala\": [${scala212}, ${scala213}, ${scala3}]}" >> $GITHUB_OUTPUT + echo "versions={\"scala\": [${scala213}, ${scala3}]}" >> $GITHUB_OUTPUT build: needs: - setup diff --git a/build.sbt b/build.sbt index b1f8930..eb48f26 100644 --- a/build.sbt +++ b/build.sbt @@ -19,7 +19,7 @@ lazy val mess = project ) ), scalaVersion := Ver.`scala2.13`, - crossScalaVersions := Seq(Ver.`scala2.12`, Ver.`scala2.13`, Ver.scala3), + crossScalaVersions := Seq(Ver.`scala2.13`, Ver.scala3), libraryDependencies ++= Seq(MunitScalacheck).map(_ % Test), testFrameworks += new TestFramework("munit.Framework"), scalafmtOnCompile := true, diff --git a/modules/core/src/main/scala_2.12-/mess/codec/AutoOps.scala b/modules/core/src/main/scala_2.12-/mess/codec/AutoOps.scala deleted file mode 100644 index d08f137..0000000 --- a/modules/core/src/main/scala_2.12-/mess/codec/AutoOps.scala +++ /dev/null @@ -1,8 +0,0 @@ -package mess.codec - -import shapeless.Lazy - -private[codec] trait AutoOps { - implicit def autoDerivedEncoder[A](implicit A: Lazy[DerivedEncoder[A]]): Encoder.AsMap[A] = A.value - implicit def autoDerivedDecoder[A](implicit A: Lazy[DerivedDecoder[A]]): Decoder[A] = A.value -} diff --git a/modules/core/src/main/scala_2.12-/mess/codec/DerivedDecoder1.scala b/modules/core/src/main/scala_2.12-/mess/codec/DerivedDecoder1.scala deleted file mode 100644 index 15db230..0000000 --- a/modules/core/src/main/scala_2.12-/mess/codec/DerivedDecoder1.scala +++ /dev/null @@ -1,32 +0,0 @@ -package mess.codec - -import shapeless._ -import shapeless.labelled._ - -private[codec] trait DerivedDecoder1 extends DerivedDecoder2 { self: DerivedDecoderOps => - implicit final def decodeGen[A, R](implicit - gen: LabelledGeneric.Aux[A, R], - decodeR: Lazy[DerivedDecoder[R]] - ): DerivedDecoder[A] = decodeGenInternal(gen, decodeR.value) -} - -private[codec] trait DerivedDecoder2 extends DerivedDecoder3 { self: DerivedDecoderOps => - implicit final val decodeHNil: DerivedDecoder[HNil] = _ => Right(HNil) - - implicit final def decodeLabelledHList[K <: Symbol, H, T <: HList](implicit - witK: Witness.Aux[K], - decodeH: Decoder[H], - decodeT: Lazy[DerivedDecoder[T]] - ): DerivedDecoder[FieldType[K, H] :: T] = self.decodeLabelledHListInternal(witK, decodeH, decodeT.value) -} - -private[codec] trait DerivedDecoder3 { self: DerivedDecoderOps => - implicit final val decodeCNil: DerivedDecoder[CNil] = - m => Left(TypeMismatchError("Sum", m)) - - implicit final def decodeLabelledCoproduct[K <: Symbol, L, R <: Coproduct](implicit - witK: Witness.Aux[K], - decodeL: Lazy[DerivedDecoder[L]], - decodeR: Lazy[DerivedDecoder[R]] - ): DerivedDecoder[FieldType[K, L] :+: R] = decodeLabelledCoproductInternal(witK, decodeL.value, decodeR.value) -} diff --git a/modules/core/src/main/scala_2.12-/mess/codec/DerivedEncoder1.scala b/modules/core/src/main/scala_2.12-/mess/codec/DerivedEncoder1.scala deleted file mode 100644 index 9a68ed2..0000000 --- a/modules/core/src/main/scala_2.12-/mess/codec/DerivedEncoder1.scala +++ /dev/null @@ -1,35 +0,0 @@ -package mess.codec - -import mess.Fmt -import shapeless._ -import shapeless.labelled._ - -private[codec] trait DerivedEncoder1 extends DerivedEncoder2 { self: DerivedEncoderOps => - implicit final def encodeGen[A, R](implicit - gen: LabelledGeneric.Aux[A, R], - encodeR: Lazy[DerivedEncoder[R]] - ): DerivedEncoder[A] = encodeGenInternal(gen, encodeR.value) -} - -private[codec] trait DerivedEncoder2 extends DerivedEncoder3 { self: DerivedEncoderOps => - implicit final val encodeHNil: DerivedEncoder[HNil] = - _ => Fmt.MMap.newBuilder - - implicit final def encodeLabelledHList[K <: Symbol, H, T <: HList](implicit - witK: Witness.Aux[K], - encodeK: Encoder[K], - encodeH: Encoder[H], - encodeT: Lazy[DerivedEncoder[T]] - ): DerivedEncoder[FieldType[K, H] :: T] = encodeLabelledHListInternal(witK, encodeK, encodeH, encodeT.value) -} - -private[codec] trait DerivedEncoder3 { self: DerivedEncoderOps => - implicit final val encodeCNil: DerivedEncoder[CNil] = - _ => sys.error("Cannot encode CNil") - - implicit final def encodeLabelledCCons[K <: Symbol, L, R <: Coproduct](implicit - witK: Witness.Aux[K], - encodeL: Lazy[DerivedEncoder[L]], - encodeR: Lazy[DerivedEncoder[R]] - ): DerivedEncoder[FieldType[K, L] :+: R] = encodeLabelledCConsInternal(witK, encodeL.value, encodeR.value) -} diff --git a/modules/core/src/main/scala_2.12-/mess/codec/SemiautoOps.scala b/modules/core/src/main/scala_2.12-/mess/codec/SemiautoOps.scala deleted file mode 100644 index 2494d34..0000000 --- a/modules/core/src/main/scala_2.12-/mess/codec/SemiautoOps.scala +++ /dev/null @@ -1,8 +0,0 @@ -package mess.codec - -import shapeless.Lazy - -private[codec] trait SemiautoOps { - def derivedEncoder[A](implicit A: Lazy[DerivedEncoder[A]]): Encoder.AsMap[A] = A.value - def derivedDecoder[A](implicit A: Lazy[DerivedDecoder[A]]): Decoder[A] = A.value -} diff --git a/modules/core/src/main/scala_2.12-/mess/internal/ScalaVersionSpecifics.scala b/modules/core/src/main/scala_2.12-/mess/internal/ScalaVersionSpecifics.scala deleted file mode 100644 index 226e6bb..0000000 --- a/modules/core/src/main/scala_2.12-/mess/internal/ScalaVersionSpecifics.scala +++ /dev/null @@ -1,12 +0,0 @@ -package mess.internal - -import scala.collection.generic.CanBuildFrom -import scala.collection.mutable - -private[mess] object ScalaVersionSpecifics { - private[mess] type Factory[-E, +T] = CanBuildFrom[Nothing, E, T] - - implicit private[mess] class FactoryOps[F, E, T](val bf: Factory[E, T]) extends AnyVal { - def newBuilder: mutable.Builder[E, T] = bf.apply() - } -} diff --git a/project/Dependencies.scala b/project/Dependencies.scala index 0bebccd..70033a8 100644 --- a/project/Dependencies.scala +++ b/project/Dependencies.scala @@ -4,7 +4,6 @@ object Dependencies { val Ver = new { val scala3 = "3.4.2" val `scala2.13` = "2.13.14" - val `scala2.12` = "2.12.19" val shapeless = "2.3.12" val msgpackJava = "0.9.8"