From f010a46dc199e11cfc0b84158ac7df6cf031815b Mon Sep 17 00:00:00 2001 From: danicheg Date: Sat, 2 Mar 2024 09:41:32 +0300 Subject: [PATCH] Build scalac-profiling for Scala 2.13.13 --- build.sbt | 5 +++-- .../ch/epfl/scala/profilers/tools/SettingsOps.scala | 8 ++++++++ 2 files changed, 11 insertions(+), 2 deletions(-) create mode 100644 plugin/src/main/scala-2.13.13/ch/epfl/scala/profilers/tools/SettingsOps.scala diff --git a/build.sbt b/build.sbt index fbca99a..ec55858 100644 --- a/build.sbt +++ b/build.sbt @@ -25,7 +25,8 @@ lazy val root = project ) val bin212 = Seq("2.12.18", "2.12.17", "2.12.16", "2.12.15", "2.12.14", "2.12.13") -val bin213 = Seq("2.13.12", "2.13.11", "2.13.10", "2.13.9", "2.13.8", "2.13.7", "2.13.6", "2.13.5") +val bin213 = + Seq("2.13.13", "2.13.12", "2.13.11", "2.13.10", "2.13.9", "2.13.8", "2.13.7", "2.13.6", "2.13.5") // Copied from // https://github.com/scalameta/scalameta/blob/370e304b0d10db1dd65fc79a5abc1f39004aeffd/build.sbt#L724-L737 @@ -36,7 +37,7 @@ lazy val fullCrossVersionSettings = Seq( // NOTE: SBT 1.x provides cross-version support for Scala sources // (https://www.scala-sbt.org/1.x/docs/Cross-Build.html#Scala-version+specific+source+directory). // Unfortunately, it only includes directories like "scala_2.12" or "scala_2.13", - // not "scala_2.12.18" or "scala_2.13.12" that we need. + // not "scala_2.12.18" or "scala_2.13.13" that we need. // That's why we have to work around here. val base = (Compile / sourceDirectory).value val versionDir = scalaVersion.value.replaceAll("-.*", "") diff --git a/plugin/src/main/scala-2.13.13/ch/epfl/scala/profilers/tools/SettingsOps.scala b/plugin/src/main/scala-2.13.13/ch/epfl/scala/profilers/tools/SettingsOps.scala new file mode 100644 index 0000000..aadf96d --- /dev/null +++ b/plugin/src/main/scala-2.13.13/ch/epfl/scala/profilers/tools/SettingsOps.scala @@ -0,0 +1,8 @@ +package ch.epfl.scala.profilers.tools + +import scala.tools.nsc.Global + +object SettingsOps { + def areStatisticsEnabled(g: Global): Boolean = + g.settings.areStatisticsEnabled +}