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

In Scala 2 keep using scala-parser-combinators 1.x (Scala 3: 2.x) #772

Merged
merged 4 commits into from
Mar 3, 2023
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
9 changes: 3 additions & 6 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -165,16 +165,13 @@ lazy val lib = (project in file("library"))
jgit,
commonsIo,
plexusArchiver,
scalaXml,
parserCombinator(scalaVersion.value),
scalacheck % Test,
sbtIo % Test,
scalamock % Test,
"org.slf4j" % "slf4j-simple" % "1.7.36" % Test
) ++
(CrossVersion.partialVersion(scalaVersion.value) match {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't need to care about Scala 2.11 anymore, was dropped in #428

case Some((2, scalaMajor)) if scalaMajor >= 11 =>
Seq(scalaXml, parserCombinator)
case _ => Nil
}),
),
Test / testOptions += Tests.Argument(TestFrameworks.ScalaCheck, "-minSuccessfulTests", "1000", "-workers", "10")
)

Expand Down
27 changes: 16 additions & 11 deletions project/Dependencies.scala
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,20 @@ object Dependencies {
"org.scalatest" %% "scalatest-funsuite" % "3.2.15" % Test,
"org.scalatest" %% "scalatest-shouldmatchers" % "3.2.15" % Test
)
val scalamock = "org.scalamock" %% "scalamock" % "5.2.0"
val verify = "com.eed3si9n.verify" %% "verify" % "1.0.0"
val sbtIo = "org.scala-sbt" %% "io" % "1.8.0"
val scala212 = "2.12.17"
val scala213 = "2.13.10"
val sbt1 = "1.2.8"
val scalaXml = "org.scala-lang.modules" %% "scala-xml" % "2.1.0"
val parserCombinator = "org.scala-lang.modules" %% "scala-parser-combinators" % "2.2.0"
val logback = "ch.qos.logback" % "logback-classic" % "1.2.3"
val coursier = "io.get-coursier" %% "coursier" % "2.0.16"
val launcherIntf = "org.scala-sbt" % "launcher-interface" % "1.4.1"
val scalamock = "org.scalamock" %% "scalamock" % "5.2.0"
val verify = "com.eed3si9n.verify" %% "verify" % "1.0.0"
val sbtIo = "org.scala-sbt" %% "io" % "1.8.0"
val scala212 = "2.12.17"
val scala213 = "2.13.10"
val sbt1 = "1.2.8"
val scalaXml = "org.scala-lang.modules" %% "scala-xml" % "2.1.0"
def parserCombinator(scalaVersion: String) = "org.scala-lang.modules" %% "scala-parser-combinators" % {
CrossVersion.partialVersion(scalaVersion) match {
case Some((2, _)) => "1.1.2" // Do not upgrade beyond 1.x
case _ => "2.2.0"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Scala 2 always keep using 1.x, when cross compiling to Scala 3 in future it can use 2.x.

}
}
val logback = "ch.qos.logback" % "logback-classic" % "1.2.3"
val coursier = "io.get-coursier" %% "coursier" % "2.0.16"
val launcherIntf = "org.scala-sbt" % "launcher-interface" % "1.4.1"
}