diff --git a/build.sbt b/build.sbt index c9cc583d..1eafc84b 100644 --- a/build.sbt +++ b/build.sbt @@ -1,8 +1,10 @@ -import BuildConfig._ +import BuildConfig.* -val scala212 = "2.12.19" -val scala213 = "2.13.14" -val scala3 = "3.3.3" +Global / onChangedBuildSource := ReloadOnSourceChanges + +val scala212 = "2.12.20" +val scala213 = "2.13.15" +val scala3 = "3.3.4" val allScalaVersions = List(scala212, scala213, scala3) val documentationScalaVersion = scala213 @@ -14,8 +16,8 @@ ThisBuild / projectStableVersion := { else (ThisBuild / version).value } -ThisBuild / organization := "dev.vhonta" -ThisBuild / versionScheme := Some("early-semver") +ThisBuild / organization := "dev.vhonta" +ThisBuild / versionScheme := Some("early-semver") ThisBuild / sonatypeCredentialHost := "s01.oss.sonatype.org" ThisBuild / sonatypeRepository := "https://s01.oss.sonatype.org/service/local" @@ -39,7 +41,7 @@ val publishSettings = Seq( id = "vitaliihonta", name = "Vitalii Honta", email = "vitalii.honta@gmail.com", - url = new URL("https://github.com/vitaliihonta") + url = url("https://github.com/vitaliihonta") ) ) ) @@ -55,6 +57,8 @@ lazy val coverageSettings = Seq( ) lazy val baseProjectSettings = Seq( + scalaVersion := scala213, + crossScalaVersions := allScalaVersions, scalacOptions ++= { val baseOptions = Seq( "-language:implicitConversions", @@ -92,6 +96,9 @@ val baseLibSettings = baseSettings ++ publishSettings lazy val root = project .in(file(".")) .settings(baseSettings, noPublishSettings, unidocSettings) + .settings( + crossScalaVersions := Nil + ) // https://www.scala-sbt.org/1.x/docs/Cross-Build.html#Cross+building+a+project+statefully, .settings( name := "zio-temporal-root", scalaVersion := scala213 diff --git a/core/src/main/scala-2/zio/temporal/ZSearchAttributeMetaEnumInstances.scala b/core/src/main/scala-2/zio/temporal/ZSearchAttributeMetaEnumInstances.scala index 0be4c136..8034aa14 100644 --- a/core/src/main/scala-2/zio/temporal/ZSearchAttributeMetaEnumInstances.scala +++ b/core/src/main/scala-2/zio/temporal/ZSearchAttributeMetaEnumInstances.scala @@ -4,6 +4,6 @@ trait ZSearchAttributeMetaEnumInstances { /** Provides an attribute meta for old [[scala.Enumeration]] */ - def enumeration(enum: Enumeration): ZSearchAttributeMeta.Of[enum.Value, ZSearchAttribute.Keyword, String] = - new ZSearchAttributeMeta.KeywordMeta[enum.Value](_.toString, raw => enum.withName(raw)) + def enumeration(`enum`: Enumeration): ZSearchAttributeMeta.Of[`enum`.Value, ZSearchAttribute.Keyword, String] = + new ZSearchAttributeMeta.KeywordMeta[`enum`.Value](_.toString, raw => `enum`.withName(raw)) } diff --git a/core/src/main/scala-2/zio/temporal/enumeratum/EnumSearchAttributes.scala b/core/src/main/scala-2/zio/temporal/enumeratum/EnumSearchAttributes.scala index e9a86f64..f860beff 100644 --- a/core/src/main/scala-2/zio/temporal/enumeratum/EnumSearchAttributes.scala +++ b/core/src/main/scala-2/zio/temporal/enumeratum/EnumSearchAttributes.scala @@ -10,12 +10,12 @@ import zio.temporal.{ZSearchAttribute, ZSearchAttributeMeta} trait EnumSearchAttributes { implicit def enumAttribute[E <: EnumEntry]( - implicit enum: Enum[E] + implicit `enum`: Enum[E] ): ZSearchAttributeMeta.Of[E, ZSearchAttribute.Keyword, String] = - new ZSearchAttributeMeta.KeywordMeta[E](_.entryName, enum.withName) + new ZSearchAttributeMeta.KeywordMeta[E](_.entryName, `enum`.withName) implicit def stringEnumAttribute[E <: StringEnumEntry]( - implicit enum: StringEnum[E] + implicit `enum`: StringEnum[E] ): ZSearchAttributeMeta.Of[E, ZSearchAttribute.Keyword, String] = - new ZSearchAttributeMeta.KeywordMeta[E](_.value, enum.withValue) + new ZSearchAttributeMeta.KeywordMeta[E](_.value, `enum`.withValue) } diff --git a/core/src/main/scala/zio/temporal/ZSearchAttributeMeta.scala b/core/src/main/scala/zio/temporal/ZSearchAttributeMeta.scala index fe2d5dd2..afbe4d92 100644 --- a/core/src/main/scala/zio/temporal/ZSearchAttributeMeta.scala +++ b/core/src/main/scala/zio/temporal/ZSearchAttributeMeta.scala @@ -156,34 +156,34 @@ object ZSearchAttributeMeta extends ZSearchAttributeMetaCollectionInstances with override def decode(value: A): A = value } - private final object StringMeta extends SimplePlainMeta[String] { + private object StringMeta extends SimplePlainMeta[String] { override def underlyingAttributeKey(name: String): SearchAttributeKey[String] = { SearchAttributeKey.forText(name) } } - private final object BooleanMeta extends SimplePlainMeta[Boolean] { + private object BooleanMeta extends SimplePlainMeta[Boolean] { override def underlyingAttributeKey(name: String): SearchAttributeKey[Boolean] = { // safe to cast java.lang.Boolean to Boolean SearchAttributeKey.forBoolean(name).asInstanceOf[SearchAttributeKey[Boolean]] } } - private final object LongMeta extends SimplePlainMeta[Long] { + private object LongMeta extends SimplePlainMeta[Long] { override def underlyingAttributeKey(name: String): SearchAttributeKey[Long] = { // safe to cast java.lang.Long to Long SearchAttributeKey.forLong(name).asInstanceOf[SearchAttributeKey[Long]] } } - private final object DoubleMeta extends SimplePlainMeta[Double] { + private object DoubleMeta extends SimplePlainMeta[Double] { override def underlyingAttributeKey(name: String): SearchAttributeKey[Double] = { // safe to cast java.lang.Double to Double SearchAttributeKey.forDouble(name).asInstanceOf[SearchAttributeKey[Double]] } } - private final object OffsetDateTimeMeta extends SimplePlainMeta[OffsetDateTime] { + private object OffsetDateTimeMeta extends SimplePlainMeta[OffsetDateTime] { override def underlyingAttributeKey(name: String): SearchAttributeKey[OffsetDateTime] = { SearchAttributeKey.forOffsetDateTime(name) } diff --git a/core/src/main/scala/zio/temporal/activity/ExtendsActivity.scala b/core/src/main/scala/zio/temporal/activity/ExtendsActivity.scala index db4769ec..9ee24ecc 100644 --- a/core/src/main/scala/zio/temporal/activity/ExtendsActivity.scala +++ b/core/src/main/scala/zio/temporal/activity/ExtendsActivity.scala @@ -8,5 +8,5 @@ object ExtendsActivity extends ExtendsActivityImplicits { def apply[A](implicit ev: ExtendsActivity[A]): ev.type = ev @internalApi - final object __zio_temporal_ExtendsActivityInstance extends ExtendsActivity[Any] + object __zio_temporal_ExtendsActivityInstance extends ExtendsActivity[Any] } diff --git a/core/src/main/scala/zio/temporal/activity/IsActivity.scala b/core/src/main/scala/zio/temporal/activity/IsActivity.scala index 81b1bbac..818511c8 100644 --- a/core/src/main/scala/zio/temporal/activity/IsActivity.scala +++ b/core/src/main/scala/zio/temporal/activity/IsActivity.scala @@ -8,5 +8,5 @@ object IsActivity extends IsActivityImplicits { def apply[A](implicit ev: IsActivity[A]): ev.type = ev @internalApi - final object __zio_temporal_IsActivityInstance extends IsActivity[Any] + object __zio_temporal_IsActivityInstance extends IsActivity[Any] } diff --git a/core/src/main/scala/zio/temporal/schedules/ZSchedule.scala b/core/src/main/scala/zio/temporal/schedules/ZSchedule.scala index be56083e..af2b7719 100644 --- a/core/src/main/scala/zio/temporal/schedules/ZSchedule.scala +++ b/core/src/main/scala/zio/temporal/schedules/ZSchedule.scala @@ -217,7 +217,7 @@ object ZScheduleSpec { protected[temporal] def applyTo(builder: ScheduleSpec.Builder): Unit } - final object Times { + object Times { def fromJava(spec: ScheduleSpec): Times = { def asCalendars = Option(spec.getCalendars) .filterNot(_.isEmpty) diff --git a/core/src/main/scala/zio/temporal/workflow/ExtendsWorkflow.scala b/core/src/main/scala/zio/temporal/workflow/ExtendsWorkflow.scala index 1ad8e812..1eb2ff86 100644 --- a/core/src/main/scala/zio/temporal/workflow/ExtendsWorkflow.scala +++ b/core/src/main/scala/zio/temporal/workflow/ExtendsWorkflow.scala @@ -8,5 +8,5 @@ object ExtendsWorkflow extends ExtendsWorkflowImplicits { def apply[A](implicit ev: ExtendsWorkflow[A]): ev.type = ev @internalApi - final object __zio_temporal_ExtendsWorkflowInstance extends ExtendsWorkflow[Any] + object __zio_temporal_ExtendsWorkflowInstance extends ExtendsWorkflow[Any] } diff --git a/core/src/main/scala/zio/temporal/workflow/HasPublicNullaryConstructor.scala b/core/src/main/scala/zio/temporal/workflow/HasPublicNullaryConstructor.scala index e650c34a..c6d4c1e6 100644 --- a/core/src/main/scala/zio/temporal/workflow/HasPublicNullaryConstructor.scala +++ b/core/src/main/scala/zio/temporal/workflow/HasPublicNullaryConstructor.scala @@ -8,5 +8,5 @@ object HasPublicNullaryConstructor extends HasPublicNullaryConstructorImplicits def apply[A](implicit ev: HasPublicNullaryConstructor[A]): ev.type = ev @internalApi - final object __zio_temporal_HasPublicNullaryConstructorInstance extends HasPublicNullaryConstructor[Any] + object __zio_temporal_HasPublicNullaryConstructorInstance extends HasPublicNullaryConstructor[Any] } diff --git a/core/src/main/scala/zio/temporal/workflow/IsConcreteClass.scala b/core/src/main/scala/zio/temporal/workflow/IsConcreteClass.scala index 272744fe..3e6e9176 100644 --- a/core/src/main/scala/zio/temporal/workflow/IsConcreteClass.scala +++ b/core/src/main/scala/zio/temporal/workflow/IsConcreteClass.scala @@ -8,5 +8,5 @@ object IsConcreteClass extends IsConcreteClassImplicits { def apply[A](implicit ev: IsConcreteClass[A]): ev.type = ev @internalApi - final object __zio_temporal_IsConcreteClassInstance extends IsConcreteClass[Any] + object __zio_temporal_IsConcreteClassInstance extends IsConcreteClass[Any] } diff --git a/core/src/main/scala/zio/temporal/workflow/IsWorkflow.scala b/core/src/main/scala/zio/temporal/workflow/IsWorkflow.scala index 255d94e8..c4a67f0d 100644 --- a/core/src/main/scala/zio/temporal/workflow/IsWorkflow.scala +++ b/core/src/main/scala/zio/temporal/workflow/IsWorkflow.scala @@ -8,5 +8,5 @@ object IsWorkflow extends IsWorkflowImplicits { def apply[A](implicit ev: IsWorkflow[A]): ev.type = ev @internalApi - final object __zio_temporal_IsWorkflowInstance extends IsWorkflow[Any] + object __zio_temporal_IsWorkflowInstance extends IsWorkflow[Any] } diff --git a/core/src/main/scala/zio/temporal/workflow/ZAsync.scala b/core/src/main/scala/zio/temporal/workflow/ZAsync.scala index c693c022..2d5e2f40 100644 --- a/core/src/main/scala/zio/temporal/workflow/ZAsync.scala +++ b/core/src/main/scala/zio/temporal/workflow/ZAsync.scala @@ -226,7 +226,7 @@ object ZAsync { )(f: A => ZAsync[B] )(implicit bf: BuildFrom[Collection[A], B, Collection[B]] ): ZAsync[Collection[B]] = - in.foldLeft[ZAsync[mutable.Builder[B, Collection[B]]]](succeed(bf(in)))((acc, a) => acc.zipWith(f(a))(_ += _)) + in.foldLeft[ZAsync[mutable.Builder[B, Collection[B]]]](succeed(bf.newBuilder(in)))((acc, a) => acc.zipWith(f(a))(_ += _)) .map(_.result()) /** Similar to [[zio.ZIO.foreachDiscard]] for collections @@ -371,7 +371,7 @@ object ZAsync { } } - final object Result { + object Result { final implicit class AllEffectsOps[A](private val self: Result[Cancel with Timeout, A]) extends AnyVal { diff --git a/core/src/main/scala/zio/temporal/workflow/ZSaga.scala b/core/src/main/scala/zio/temporal/workflow/ZSaga.scala index 969338f0..f213d3e7 100644 --- a/core/src/main/scala/zio/temporal/workflow/ZSaga.scala +++ b/core/src/main/scala/zio/temporal/workflow/ZSaga.scala @@ -215,21 +215,21 @@ object ZSaga { def interpret[A0](saga: ZSaga[A0]): Either[Throwable, A0] = saga match { - case succeed: Succeed[A0] => Right(succeed.value) + case succeed: Succeed[_] => Right(succeed.value) case failed: Failed => Left(failed.error) - case attempt: Attempt[A0] => Try(attempt.thunk()).toEither + case attempt: Attempt[_] => Try(attempt.thunk()).toEither - case compensation: Compensation[A0] => + case compensation: Compensation[_] => temporalSaga.addCompensation((() => compensation.compensate()): Proc) interpret(compensation.cont) - case cont: Bind[baseA, A0] => + case cont: Bind[_, _] => interpret(cont.base) match { case left @ Left(_) => left.asInstanceOf[Either[Throwable, A0]] case Right(value) => interpret(cont.cont(value)) } - case catchAll: CatchAll[A0] => + case catchAll: CatchAll[_] => interpret(catchAll.base) match { case right: Right[Throwable, A0] => right case Left(error) => interpret(catchAll.handle(error)) diff --git a/integration-tests/src/test/scala/zio/temporal/fixture/ZioLocalWorkflow.scala b/integration-tests/src/test/scala/zio/temporal/fixture/ZioLocalWorkflow.scala index 123a13f1..473f2af2 100644 --- a/integration-tests/src/test/scala/zio/temporal/fixture/ZioLocalWorkflow.scala +++ b/integration-tests/src/test/scala/zio/temporal/fixture/ZioLocalWorkflow.scala @@ -35,6 +35,6 @@ class ZioLocalWorkflowImpl extends ZioLocalWorkflow { override def complete(): Unit = { logger.info("Completion received!") - state := () + state := (()) } } diff --git a/integration-tests/src/test/scala/zio/temporal/fixture/ZioWorkflow.scala b/integration-tests/src/test/scala/zio/temporal/fixture/ZioWorkflow.scala index 8ab4e965..7cd43a29 100644 --- a/integration-tests/src/test/scala/zio/temporal/fixture/ZioWorkflow.scala +++ b/integration-tests/src/test/scala/zio/temporal/fixture/ZioWorkflow.scala @@ -50,6 +50,6 @@ class ZioWorkflowImpl extends ZioWorkflow { override def complete(): Unit = { logger.info("Completion received!") - state := () + state := (()) } } diff --git a/integration-tests/src/test/scala/zio/temporal/fixture/ZioWorkflowUntyped.scala b/integration-tests/src/test/scala/zio/temporal/fixture/ZioWorkflowUntyped.scala index 2aca663a..e9681b51 100644 --- a/integration-tests/src/test/scala/zio/temporal/fixture/ZioWorkflowUntyped.scala +++ b/integration-tests/src/test/scala/zio/temporal/fixture/ZioWorkflowUntyped.scala @@ -51,6 +51,6 @@ class ZioWorkflowUntypedImpl extends ZioWorkflowUntyped { override def complete(): Unit = { logger.info("Completion received!") - state := () + state := (()) } } diff --git a/integration-tests/src/test/scala/zio/temporal/fixture/complex_type_workflow.scala b/integration-tests/src/test/scala/zio/temporal/fixture/complex_type_workflow.scala index e8ce87a1..a2e75a9a 100644 --- a/integration-tests/src/test/scala/zio/temporal/fixture/complex_type_workflow.scala +++ b/integration-tests/src/test/scala/zio/temporal/fixture/complex_type_workflow.scala @@ -125,6 +125,6 @@ class ComplexWorkflowImpl extends ComplexWorkflow { triple.snapshot override def resume(): Unit = { - resumed := () + resumed := (()) } } diff --git a/project/BuildConfig.scala b/project/BuildConfig.scala index 0ee09068..98543171 100644 --- a/project/BuildConfig.scala +++ b/project/BuildConfig.scala @@ -68,12 +68,12 @@ object BuildConfig extends Dependencies { trait Dependencies { private object versions { - val temporal = "1.25.1" - val zio = "2.1.7" - val zioLogging = "2.3.0" - val enumeratum = "1.7.4" - val jackson = "2.17.2" - val otel = "1.40.0" + val temporal = "1.27.0" + val zio = "2.1.14" + val zioLogging = "2.4.0" + val enumeratum = "1.7.5" + val jackson = "2.18.2" + val otel = "1.45.0" } object org { @@ -103,7 +103,7 @@ trait Dependencies { val testFrameworks = Seq(new TestFramework("zio.test.sbt.ZTestFramework")) // only for examples - val cli = org.zio %% "zio-cli" % "0.5.0" + val cli = org.zio %% "zio-cli" % "0.7.0" } object Enumeratum { @@ -129,7 +129,7 @@ trait Dependencies { object Logging { val zio = org.zio %% "zio-logging" % versions.zioLogging val zioSlf4j = org.zio %% "zio-logging-slf4j" % versions.zioLogging - val logback = "ch.qos.logback" % "logback-classic" % "1.2.11" + val logback = "ch.qos.logback" % "logback-classic" % "1.5.16" } object Testing { @@ -141,10 +141,10 @@ trait Dependencies { val otelExporterOtlp = "io.opentelemetry" % "opentelemetry-exporter-otlp" % versions.otel val otelTracePropagators = "io.opentelemetry" % "opentelemetry-extension-trace-propagators" % versions.otel val otelOpentracingShim = "io.opentelemetry" % "opentelemetry-opentracing-shim" % versions.otel - val otelSemvonc = "io.opentelemetry.semconv" % "opentelemetry-semconv" % "1.26.0-alpha" + val otelSemvonc = "io.opentelemetry.semconv" % "opentelemetry-semconv" % "1.29.0-alpha" val otel = Seq(otelApi, otelExporterOtlp, otelTracePropagators, otelOpentracingShim, otelSemvonc) - val micrometerOtlp = "io.micrometer" % "micrometer-registry-otlp" % "1.13.2" + val micrometerOtlp = "io.micrometer" % "micrometer-registry-otlp" % "1.14.2" } } diff --git a/project/build.properties b/project/build.properties index ad302606..0882e8a3 100644 --- a/project/build.properties +++ b/project/build.properties @@ -1 +1 @@ -sbt.version = 1.10.1 \ No newline at end of file +sbt.version = 1.10.7 \ No newline at end of file diff --git a/project/plugins.sbt b/project/plugins.sbt index 75fc118e..93723681 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -1,7 +1,7 @@ addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.5.2") -addSbtPlugin("com.eed3si9n" % "sbt-projectmatrix" % "0.10.0") -addSbtPlugin("com.github.sbt" % "sbt-ci-release" % "1.6.0") -addSbtPlugin("org.scoverage" % "sbt-scoverage" % "2.1.0") -addSbtPlugin("org.scalameta" % "sbt-mdoc" % "2.5.4") +addSbtPlugin("com.eed3si9n" % "sbt-projectmatrix" % "0.10.1") +addSbtPlugin("com.github.sbt" % "sbt-ci-release" % "1.9.2") +addSbtPlugin("org.scoverage" % "sbt-scoverage" % "2.2.2") +addSbtPlugin("org.scalameta" % "sbt-mdoc" % "2.6.2") addSbtPlugin("com.github.sbt" % "sbt-unidoc" % "0.5.0") -addSbtPlugin("com.eed3si9n" % "sbt-buildinfo" % "0.12.0") +addSbtPlugin("com.eed3si9n" % "sbt-buildinfo" % "0.13.1") diff --git a/protobuf/src/main/scala-2/zio/temporal/protobuf/EnumProtoType.scala b/protobuf/src/main/scala-2/zio/temporal/protobuf/EnumProtoType.scala index 4f0e4103..8781cf41 100644 --- a/protobuf/src/main/scala-2/zio/temporal/protobuf/EnumProtoType.scala +++ b/protobuf/src/main/scala-2/zio/temporal/protobuf/EnumProtoType.scala @@ -14,18 +14,18 @@ object EnumProtoType { } final class EnumeratumEnumException private[protobuf] ( - enum: Enum[_], + `enum`: Enum[_], entry: AnyRef, companion: GeneratedEnumCompanion[_]) extends RuntimeException { override def getMessage: String = - s"Unable to convert $entry (value of $enum) to $companion, expected one of ${companion.values.mkString("[", ", ", "]")}" + s"Unable to convert $entry (value of ${`enum`}) to $companion, expected one of ${companion.values.mkString("[", ", ", "]")}" } final class EnumProtoType[P <: GeneratedEnum, E <: EnumEntry] private[protobuf] ( companion: GeneratedEnumCompanion[P], - enum: Enum[E]) + `enum`: Enum[E]) extends ProtoType[E] { override type Repr = P @@ -34,16 +34,16 @@ final class EnumProtoType[P <: GeneratedEnum, E <: EnumEntry] private[protobuf] companion .fromName(value.entryName) .getOrElse( - throw new EnumeratumEnumException(enum, value, companion) + throw new EnumeratumEnumException(`enum`, value, companion) ) override def fromRepr(repr: P): E = - enum.withNameInsensitive(repr.name) + `enum`.withNameInsensitive(repr.name) } final class EnumProtoTypePartiallyApplied[P <: GeneratedEnum](private val companion: GeneratedEnumCompanion[P]) extends AnyVal { - def to[E <: EnumEntry](enum: Enum[E]): ProtoType.Of[E, P] = + def to[E <: EnumEntry](`enum`: Enum[E]): ProtoType.Of[E, P] = new EnumProtoType[P, E](companion, `enum`) } diff --git a/protobuf/src/main/scala/zio/temporal/protobuf/internal/types.scala b/protobuf/src/main/scala/zio/temporal/protobuf/internal/types.scala index 2ee79a74..2c0afc26 100644 --- a/protobuf/src/main/scala/zio/temporal/protobuf/internal/types.scala +++ b/protobuf/src/main/scala/zio/temporal/protobuf/internal/types.scala @@ -13,17 +13,17 @@ private[protobuf] sealed abstract class IdType[A] extends ProtoType[A] { override def fromRepr(repr: A): A = repr } -private[protobuf] final object IntegerType extends IdType[Int] +private[protobuf] object IntegerType extends IdType[Int] -private[protobuf] final object LongType extends IdType[Long] +private[protobuf] object LongType extends IdType[Long] -private[protobuf] final object BooleanType extends IdType[Boolean] +private[protobuf] object BooleanType extends IdType[Boolean] -private[protobuf] final object StringType extends IdType[String] +private[protobuf] object StringType extends IdType[String] -private[protobuf] final object BytesType extends IdType[Array[Byte]] +private[protobuf] object BytesType extends IdType[Array[Byte]] -private[protobuf] final object UuidType extends ProtoType[ju.UUID] { +private[protobuf] object UuidType extends ProtoType[ju.UUID] { override type Repr = UUID override def repr(value: ju.UUID): UUID = @@ -36,7 +36,7 @@ private[protobuf] final object UuidType extends ProtoType[ju.UUID] { new ju.UUID(repr.mostSignificantBits, repr.leastSignificantBits) } -private[protobuf] final object BigDecimalType extends ProtoType[scala.BigDecimal] { +private[protobuf] object BigDecimalType extends ProtoType[scala.BigDecimal] { override type Repr = BigDecimal override def repr(value: scala.BigDecimal): BigDecimal = @@ -49,7 +49,7 @@ private[protobuf] final object BigDecimalType extends ProtoType[scala.BigDecimal new scala.BigDecimal(new math.BigDecimal(BigIntegerType.fromRepr(repr.intVal).bigInteger, repr.scale)) } -private[protobuf] final object BigIntegerType extends ProtoType[scala.BigInt] { +private[protobuf] object BigIntegerType extends ProtoType[scala.BigInt] { override type Repr = BigInteger override def repr(value: BigInt): BigInteger = @@ -59,7 +59,7 @@ private[protobuf] final object BigIntegerType extends ProtoType[scala.BigInt] { new BigInt(new math.BigInteger(repr.value.toByteArray)) } -private[protobuf] final object ZUnitType extends ProtoType[Unit] { +private[protobuf] object ZUnitType extends ProtoType[Unit] { override type Repr = ZUnit override def repr(value: Unit): ZUnitType.Repr = ZUnit()