From 2d48ebb005a5ecf77338808e93650fa0d7ff54ee Mon Sep 17 00:00:00 2001 From: satorg Date: Wed, 25 Oct 2023 08:17:15 -0700 Subject: [PATCH 1/2] rid of "compile-time" in favor of "provided" --- .../scala/org/typelevel/sbt/TypelevelKernelPlugin.scala | 8 ++------ .../scala/org/typelevel/sbt/TypelevelSettingsPlugin.scala | 3 +-- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/kernel/src/main/scala/org/typelevel/sbt/TypelevelKernelPlugin.scala b/kernel/src/main/scala/org/typelevel/sbt/TypelevelKernelPlugin.scala index d203c604..81d3a73f 100644 --- a/kernel/src/main/scala/org/typelevel/sbt/TypelevelKernelPlugin.scala +++ b/kernel/src/main/scala/org/typelevel/sbt/TypelevelKernelPlugin.scala @@ -29,7 +29,8 @@ object TypelevelKernelPlugin extends AutoPlugin { override def trigger = allRequirements object autoImport { - lazy val CompileTime: Configuration = config("compile-time").hide + @deprecated("use `Provided` instead", "0.6.1") + lazy val CompileTime: Configuration = Provided lazy val tlIsScala3 = settingKey[Boolean]("True if building with Scala 3") @@ -79,11 +80,6 @@ object TypelevelKernelPlugin extends AutoPlugin { } ) - override def projectSettings = Seq( - ivyConfigurations += CompileTime, - Compile / unmanagedClasspath ++= update.value.select(configurationFilter(CompileTime.name)) - ) - private[sbt] def mkCommand(commands: List[String]): String = commands.mkString("; ", "; ", "") private[sbt] lazy val currentRelease: Def.Initialize[Option[String]] = Def.setting { diff --git a/settings/src/main/scala/org/typelevel/sbt/TypelevelSettingsPlugin.scala b/settings/src/main/scala/org/typelevel/sbt/TypelevelSettingsPlugin.scala index b3d025ce..288cb299 100644 --- a/settings/src/main/scala/org/typelevel/sbt/TypelevelSettingsPlugin.scala +++ b/settings/src/main/scala/org/typelevel/sbt/TypelevelSettingsPlugin.scala @@ -66,8 +66,7 @@ object TypelevelSettingsPlugin extends AutoPlugin { val scalacCompat = if (Set("2.12", "2.13", "3").contains(scalaBinaryVersion.value)) - Seq(CompileTime, Test).map( - "org.typelevel" %% "scalac-compat-annotation" % "0.1.2" % _) + Seq("org.typelevel" %% "scalac-compat-annotation" % "0.1.2" % Provided) else Nil From 8f16fcc766d286c4b76104d0d7b85cc25141e4d3 Mon Sep 17 00:00:00 2001 From: satorg Date: Thu, 26 Oct 2023 23:10:52 -0700 Subject: [PATCH 2/2] restore "compile-time" keeping it deprecated --- .../org/typelevel/sbt/TypelevelKernelPlugin.scala | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/kernel/src/main/scala/org/typelevel/sbt/TypelevelKernelPlugin.scala b/kernel/src/main/scala/org/typelevel/sbt/TypelevelKernelPlugin.scala index 81d3a73f..5f55abe2 100644 --- a/kernel/src/main/scala/org/typelevel/sbt/TypelevelKernelPlugin.scala +++ b/kernel/src/main/scala/org/typelevel/sbt/TypelevelKernelPlugin.scala @@ -18,10 +18,11 @@ package org.typelevel.sbt import org.typelevel.sbt.kernel.GitHelper import org.typelevel.sbt.kernel.V +import sbt.Keys._ import sbt._ import sbt.plugins.JvmPlugin -import Keys._ +import scala.annotation.nowarn object TypelevelKernelPlugin extends AutoPlugin { @@ -30,7 +31,7 @@ object TypelevelKernelPlugin extends AutoPlugin { object autoImport { @deprecated("use `Provided` instead", "0.6.1") - lazy val CompileTime: Configuration = Provided + lazy val CompileTime: Configuration = config("compile-time").hide lazy val tlIsScala3 = settingKey[Boolean]("True if building with Scala 3") @@ -80,6 +81,12 @@ object TypelevelKernelPlugin extends AutoPlugin { } ) + @nowarn("cat=deprecation") + override def projectSettings = Seq( + ivyConfigurations += CompileTime, + Compile / unmanagedClasspath ++= update.value.select(configurationFilter(CompileTime.name)) + ) + private[sbt] def mkCommand(commands: List[String]): String = commands.mkString("; ", "; ", "") private[sbt] lazy val currentRelease: Def.Initialize[Option[String]] = Def.setting {