diff options
| author | Jack Koenig | 2021-03-02 15:32:24 -0800 |
|---|---|---|
| committer | GitHub | 2021-03-02 15:32:24 -0800 |
| commit | 38dc5401ea875037e23bbbe998fb1b0f9aef7334 (patch) | |
| tree | 948ea28b7dbbef0347e6e86d30b6f12854fe61f1 /src/main | |
| parent | 541a70c9489ec90118d45d4c953af0d0a33f8316 (diff) | |
Remove Scala 2.11 (#2062)
Diffstat (limited to 'src/main')
| -rw-r--r-- | src/main/scala/firrtl/stage/FirrtlAnnotations.scala | 9 | ||||
| -rw-r--r-- | src/main/scala/firrtl/stage/transforms/CheckScalaVersion.scala | 17 |
2 files changed, 10 insertions, 16 deletions
diff --git a/src/main/scala/firrtl/stage/FirrtlAnnotations.scala b/src/main/scala/firrtl/stage/FirrtlAnnotations.scala index 7d0d237a..26655efd 100644 --- a/src/main/scala/firrtl/stage/FirrtlAnnotations.scala +++ b/src/main/scala/firrtl/stage/FirrtlAnnotations.scala @@ -255,13 +255,18 @@ case class FirrtlCircuitAnnotation(circuit: Circuit) extends NoTargetAnnotation * * - set with `--warn:no-scala-version-deprecation` */ +@deprecated("Support for Scala 2.11 has been dropped, this object no longer does anything", "FIRRTL 1.5") case object WarnNoScalaVersionDeprecation extends NoTargetAnnotation with FirrtlOption with HasShellOptions { def longOption: String = "warn:no-scala-version-deprecation" val options = Seq( new ShellOption[Unit]( longOption = longOption, - toAnnotationSeq = { _ => Seq(this) }, - helpText = "Suppress Scala 2.11 deprecation warning (ignored in Scala 2.12+)" + toAnnotationSeq = { _ => + val msg = s"'$longOption' no longer does anything and will be removed in FIRRTL 1.6" + firrtl.options.StageUtils.dramaticWarning(msg) + Seq(this) + }, + helpText = "(deprecated, this option does nothing)" ) ) } diff --git a/src/main/scala/firrtl/stage/transforms/CheckScalaVersion.scala b/src/main/scala/firrtl/stage/transforms/CheckScalaVersion.scala index 9d894905..6ed900f1 100644 --- a/src/main/scala/firrtl/stage/transforms/CheckScalaVersion.scala +++ b/src/main/scala/firrtl/stage/transforms/CheckScalaVersion.scala @@ -6,14 +6,10 @@ import firrtl.{BuildInfo, CircuitState, DependencyAPIMigration, Transform} import firrtl.stage.WarnNoScalaVersionDeprecation import firrtl.options.StageUtils.dramaticWarning +@deprecated("Support for 2.11 has been dropped, this logic no longer does anything", "FIRRTL 1.5") object CheckScalaVersion { def migrationDocumentLink: String = "https://www.chisel-lang.org/chisel3/upgrading-from-scala-2-11.html" - private def getScalaMajorVersion: Int = { - val "2" :: major :: _ :: Nil = BuildInfo.scalaVersion.split("\\.").toList - major.toInt - } - final def deprecationMessage(version: String, option: String) = s"""|FIRRTL support for Scala $version is deprecated, please upgrade to Scala 2.12. | Migration guide: $migrationDocumentLink @@ -21,17 +17,10 @@ object CheckScalaVersion { } +@deprecated("Support for 2.11 has been dropped, this transform no longer does anything", "FIRRTL 1.5") class CheckScalaVersion extends Transform with DependencyAPIMigration { - import CheckScalaVersion._ override def invalidates(a: Transform) = false - def execute(state: CircuitState): CircuitState = { - def suppress = state.annotations.contains(WarnNoScalaVersionDeprecation) - if (getScalaMajorVersion == 11 && !suppress) { - val option = s"--${WarnNoScalaVersionDeprecation.longOption}" - dramaticWarning(deprecationMessage("2.11", option)) - } - state - } + def execute(state: CircuitState): CircuitState = state } |
