From 91e054bf7fd446cd74418284b40eb7b66e75467f Mon Sep 17 00:00:00 2001 From: Nabil Abdel-Hafeez <7283535+987Nabil@users.noreply.github.com> Date: Tue, 28 May 2024 11:23:42 +0200 Subject: [PATCH] Remove silencer (#2866) Is now integrated to Scala 2.12 in addition to 2.13 and 3.x --- project/BuildHelper.scala | 12 ------------ project/ScalaSettings.scala | 2 -- .../src/main/scala/example/StaticFiles.scala | 2 +- 3 files changed, 1 insertion(+), 15 deletions(-) diff --git a/project/BuildHelper.scala b/project/BuildHelper.scala index f371e6200f..9f5485ac0c 100644 --- a/project/BuildHelper.scala +++ b/project/BuildHelper.scala @@ -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", @@ -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 := { diff --git a/project/ScalaSettings.scala b/project/ScalaSettings.scala index e48fc5f777..187f15498b 100644 --- a/project/ScalaSettings.scala +++ b/project/ScalaSettings.scala @@ -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( @@ -80,6 +79,5 @@ trait ScalaSettings { "-Ywarn-unused:_,imports", "-Ywarn-unused:imports", "-Ywarn-unused:params,-implicits", - "-P:silencer:globalFilters=[zio.stacktracer.TracingImplicits.disableAutoTrace]", ) } diff --git a/zio-http-example/src/main/scala/example/StaticFiles.scala b/zio-http-example/src/main/scala/example/StaticFiles.scala index 13098c6e4c..e8ba901007 100644 --- a/zio-http-example/src/main/scala/example/StaticFiles.scala +++ b/zio-http-example/src/main/scala/example/StaticFiles.scala @@ -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")