Skip to content

Commit

Permalink
Remove silencer (#2866)
Browse files Browse the repository at this point in the history
Is now integrated to Scala 2.12 in addition to 2.13 and 3.x
  • Loading branch information
987Nabil authored May 28, 2024
1 parent 87c3683 commit 91e054b
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 15 deletions.
12 changes: 0 additions & 12 deletions project/BuildHelper.scala
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ object BuildHelper extends ScalaSettings {
val Scala3 = "3.3.3"
val ScoverageVersion = "2.0.12"
val JmhVersion = "0.4.7"
val SilencerVersion = "1.7.17"

private val stdOptions = Seq(
"-deprecation",
Expand Down Expand Up @@ -85,17 +84,6 @@ object BuildHelper extends ScalaSettings {
s"-DZIOHttpLogLevel=${Debug.ZIOHttpLogLevel}",
),
ThisBuild / fork := true,
libraryDependencies ++= {
if (scalaVersion.value == Scala3)
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),
)
},
semanticdbEnabled := scalaVersion.value != Scala3,
semanticdbOptions += "-P:semanticdb:synthetics:on",
semanticdbVersion := {
Expand Down
2 changes: 0 additions & 2 deletions project/ScalaSettings.scala
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@ trait ScalaSettings {
"-Wunused:locals", // Warn if a local definition is unused.
"-Wvalue-discard", // Warn when non-Unit expression results are unused.
"-Ywarn-unused:params,-implicits",
"-P:silencer:globalFilters=[zio.stacktracer.TracingImplicits.disableAutoTrace]",
)

val scala212Settings: Seq[String] = baseSettings ++ Seq(
Expand All @@ -80,6 +79,5 @@ trait ScalaSettings {
"-Ywarn-unused:_,imports",
"-Ywarn-unused:imports",
"-Ywarn-unused:params,-implicits",
"-P:silencer:globalFilters=[zio.stacktracer.TracingImplicits.disableAutoTrace]",
)
}
2 changes: 1 addition & 1 deletion zio-http-example/src/main/scala/example/StaticFiles.scala
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ object StaticFiles extends ZIOAppDefault {
/**
* Creates an HTTP app that only serves static files from resources via
* "/static". For paths other than the resources directory, see
* [[Middleware.serveDirectory]].
* [[zio.http.Middleware.serveDirectory]].
*/
val routes = Routes.empty @@ Middleware.serveResources(Path.empty / "static")

Expand Down

0 comments on commit 91e054b

Please sign in to comment.