Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use unroll plugin to fix bin compat issue #751

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading