Skip to content

Commit

Permalink
fixes for breaking changes of Xsource:3 in 2.13.14
Browse files Browse the repository at this point in the history
  • Loading branch information
jenshalm committed Jul 5, 2024
1 parent 2093853 commit 0d88951
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
4 changes: 4 additions & 0 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,9 @@ inThisBuild(
)
)

def inferOverrideFor2_13(version: String): Seq[String] =
if (version.startsWith("2.13")) Seq("-Xsource-features:infer-override") else Nil

def disableMissingInterpolatorWarning(options: Seq[String]): Seq[String] =
options.map { opt =>
if (opt.startsWith("-Xlint")) opt + ",-missing-interpolator" else opt
Expand Down Expand Up @@ -134,6 +137,7 @@ lazy val core = crossProject(JSPlatform, JVMPlatform)
"org.scalameta" %%% "munit" % versions.munit % "test",
"org.typelevel" %%% "cats-core" % versions.catsCore
),
scalacOptions ++= inferOverrideFor2_13(scalaVersion.value),
Test / scalacOptions ~= disableMissingInterpolatorWarning
)
.jvmSettings(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ private[laika] object ConfigResolver {
obj.values.groupBy(_.key.getOrElse(Key.root)).mapValuesStrict(_.map(_.value)).toSeq.map {
case (key, values) =>
val merged = values.reduce(mergeValues(key)) match {
case obj: ObjectBuilderValue => mergeObjects(obj)
case obv: ObjectBuilderValue => mergeObjects(obv)
case other => other
}
BuilderField(key, merged)
Expand Down Expand Up @@ -373,8 +373,8 @@ private[laika] object ConfigResolver {
extract(field + "." + index, arrValue)
}
if (nested.isEmpty) wrap(failure) else nested
case InvalidBuilderValue(obj: ObjectBuilderValue, failure) =>
val nested = extractErrors(obj)
case InvalidBuilderValue(obv: ObjectBuilderValue, failure) =>
val nested = extractErrors(obv)
if (nested.isEmpty) wrap(failure) else nested
case InvalidBuilderValue(_, failure) => wrap(failure)
case incl: IncludeBuilderValue =>
Expand Down

0 comments on commit 0d88951

Please sign in to comment.