Skip to content

Commit

Permalink
Move silencer library from ThisBuild to project settings
Browse files Browse the repository at this point in the history
  • Loading branch information
neko-kai committed Mar 14, 2023
1 parent d2b2436 commit 93a7318
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 18 deletions.
18 changes: 0 additions & 18 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -23,24 +23,6 @@ inThisBuild(
scmInfo := Some(
ScmInfo(url("https://github.com/zio/interop-cats/"), "scm:git:[email protected]:zio/interop-cats.git")
),
// FIXME
// Adding silencer dependency as a workaround for DottyDoc error on Scala 3.2.2, error was:
// [error] -- Error: core/shared/src/main/scala/zio/stm/ZTRef.scala:529:4 -----------------
// [error] undefined: new com.github.ghik.silencer.silent # -1: TermRef(TypeRef(TermRef(ThisType(TypeRef(NoPrefix,module class ghik)),object silencer),silent),<init>) at readTasty
// Arising from linking to [[zio.stm.ZTRef.UnifiedSyntax#modify]] method which has a silencer
// annotation on it.
libraryDependencies ++= {
if (scalaVersion.value.startsWith("3"))
Seq(
"com.github.ghik" % s"silencer-lib_$Scala213" % SilencerVersion % Provided
)
else
Seq(
"com.github.ghik" % "silencer-lib" % SilencerVersion % Provided cross CrossVersion.full,
compilerPlugin("com.github.ghik" % "silencer-plugin" % SilencerVersion cross CrossVersion.full)
)
}
//
)
)

Expand Down
17 changes: 17 additions & 0 deletions project/BuildHelper.scala
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,23 @@ object BuildHelper {
compilerPlugin("org.typelevel" % "kind-projector" % "0.13.2") cross CrossVersion.full
)
},
// FIXME
// Adding silencer dependency as a workaround for DottyDoc error on Scala 3.2.2, error was:
// [error] -- Error: core/shared/src/main/scala/zio/stm/ZTRef.scala:529:4 -----------------
// [error] undefined: new com.github.ghik.silencer.silent # -1: TermRef(TypeRef(TermRef(ThisType(TypeRef(NoPrefix,module class ghik)),object silencer),silent),<init>) at readTasty
// Arising from linking to [[zio.stm.ZTRef.UnifiedSyntax#modify]] method which has a silencer
// annotation on it.
libraryDependencies ++= {
if (scalaVersion.value.startsWith("3"))
Seq(
"com.github.ghik" % s"silencer-lib_$Scala213" % SilencerVersion % Provided
)
else
Seq(
"com.github.ghik" % "silencer-lib" % SilencerVersion % Provided cross CrossVersion.full,
compilerPlugin("com.github.ghik" % "silencer-plugin" % SilencerVersion cross CrossVersion.full)
)
},
Test / parallelExecution := true,
incOptions ~= (_.withLogRecompileOnMacro(false)),
autoAPIMappings := true,
Expand Down

0 comments on commit 93a7318

Please sign in to comment.