Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Scala3: test against both LTS & Next, build with LTS #1926

Merged
merged 2 commits into from
Aug 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion project/Dependencies.scala
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ import sbt._
object Dependencies {
val scala212 = sys.props.getOrElse("scala212.nightly", "2.12.19")
val scala213 = sys.props.getOrElse("scala213.nightly", "2.13.14")
val scala3 = sys.props.getOrElse("scala3.nightly", "3.4.2")
val scala3Latest = sys.props.getOrElse("scala3.nightly", "3.4.2")
val scala3LTS = "3.3.4-RC1"

val bijectionCoreV = "0.9.7"
val collectionCompatV = "2.12.0"
Expand Down
8 changes: 6 additions & 2 deletions project/ScalafixBuild.scala
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ object ScalafixBuild extends AutoPlugin with GhpagesKeys {
publish / skip := true
)
lazy val supportedScalaVersions = List(scala213, scala212)
lazy val buildScalaVersions = Seq(scala212, scala213, scala3)
lazy val buildScalaVersions = Seq(scala212, scala213, scala3LTS)
lazy val buildScalaVersionsWithTargets: Seq[(String, TargetAxis)] =
buildScalaVersions.map(sv => (sv, TargetAxis(sv))) ++
Seq(scala213, scala212).flatMap { sv =>
Expand All @@ -56,10 +56,14 @@ object ScalafixBuild extends AutoPlugin with GhpagesKeys {
}

val prevVersions = previousVersions(sv).map(prev => TargetAxis(prev))
val scala3FromScala2 = TargetAxis(scala3Latest)
val xsource3 = TargetAxis(sv, xsource3 = true)

(prevVersions :+ xsource3).map((sv, _))
} :+ (scala213, TargetAxis(scala3))
} ++ Seq(
(scala213, TargetAxis(scala3Latest)),
(scala213, TargetAxis(scala3LTS))
)

lazy val publishLocalTransitive =
taskKey[Unit]("Run publishLocal on this project and its dependencies")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import scala.util.Try
import scala.util.control.NonFatal
import scala.util.matching.Regex

import scala.meta.Ref
import scala.meta._
import scala.meta.parsers.Parse

Expand All @@ -23,7 +22,6 @@ import metaconfig.Configured.NotOk
import metaconfig.Configured.Ok
import scalafix.internal.util.SymbolOps
import scalafix.patch.Patch.internal._
import scalafix.v0.Symbol
import scalafix.v0._

object ScalafixMetaconfigReaders extends ScalafixMetaconfigReaders
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import scalafix.internal.patch.LegacyPatchOps.DeprecationMessage
import scalafix.internal.util.SymbolOps.Root
import scalafix.patch.Patch.internal._
import scalafix.patch.PatchOps
import scalafix.v0.Symbol
import scalafix.v0._

trait LegacyPatchOps extends PatchOps {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package scalafix.internal.util

import scala.meta.Dialect
import scala.meta._

import scalafix.v0._
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package scalafix.internal.util

import scala.meta.Tree
import scala.meta._

import org.typelevel.paiges._
Expand Down
1 change: 0 additions & 1 deletion scalafix-core/src/main/scala/scalafix/patch/Patch.scala
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package scalafix.patch

import scala.meta.Token
import scala.meta._

import org.scalameta.logger
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import scala.meta.internal.{semanticdb => s}
import scalafix.internal.config.ScalaVersion
import scalafix.internal.patch.CrashingSemanticdbIndex
import scalafix.internal.reflect.ClasspathOps
import scalafix.internal.v1.TreePos
import scalafix.internal.v1._
import scalafix.util.SemanticdbIndex
import scalafix.v0
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package scalafix.test

import scalafix.v1.SemanticRule
import scalafix.v1._

class ScalatestAutofixRule extends SemanticRule("ScalatestAutofixRule") {
Expand Down