Skip to content

Commit

Permalink
Use unroll plugin to fix bin compat issue
Browse files Browse the repository at this point in the history
  • Loading branch information
987Nabil committed Oct 15, 2024
1 parent eb235a7 commit ff9c41a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
11 changes: 7 additions & 4 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ import org.scalajs.sbtplugin.ScalaJSPlugin.autoImport._

Global / onChangedBuildSource := ReloadOnSourceChanges

addCompilerPlugin("com.lihaoyi" %% "unroll-plugin" % "0.1.12")

inThisBuild(
List(
name := "zio-schema",
Expand Down Expand Up @@ -149,10 +151,11 @@ lazy val zioSchema = crossProject(JSPlatform, JVMPlatform, NativePlatform)
.settings(buildInfoSettings("zio.schema"))
.settings(
libraryDependencies ++= Seq(
"dev.zio" %%% "zio" % zioVersion,
"dev.zio" %%% "zio-streams" % zioVersion,
"dev.zio" %%% "zio-prelude" % zioPreludeVersion,
"dev.zio" %%% "zio-constraintless" % zioConstraintlessVersion
"dev.zio" %%% "zio" % zioVersion,
"dev.zio" %%% "zio-streams" % zioVersion,
"dev.zio" %%% "zio-prelude" % zioPreludeVersion,
"dev.zio" %%% "zio-constraintless" % zioConstraintlessVersion,
"com.lihaoyi" %% "unroll-annotation" % "0.1.12"
)
)
.nativeSettings(Test / fork := false)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package zio.schema.codec
import java.nio.CharBuffer
import java.nio.charset.StandardCharsets

import scala.annotation.{ switch, tailrec }
import scala.annotation.{ switch, tailrec, unroll }
import scala.collection.immutable.ListMap

import zio.json.JsonCodec._
Expand All @@ -28,7 +28,7 @@ object JsonCodec {

final case class Config(
ignoreEmptyCollections: Boolean,
treatStreamsAsArrays: Boolean = false,
@unroll treatStreamsAsArrays: Boolean = false,
explicitNulls: Boolean = false
)

Expand Down

0 comments on commit ff9c41a

Please sign in to comment.