Skip to content

add Scala 3.0.0-RC2 and JDK 16, drop M3 and 15; move to sbt 1.5 #503

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

Merged
merged 2 commits into from
Mar 29, 2021
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
27 changes: 6 additions & 21 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,6 @@ executors:
scala_jdk11_executor:
docker:
- image: circleci/openjdk:11-jdk
scala_jdk15_executor:
docker:
- image: circleci/openjdk:15-buster
scala_jdk16_executor:
docker:
- image: circleci/openjdk:16-buster
Expand Down Expand Up @@ -119,13 +116,13 @@ workflows:
java_version: jdk8
scala_version: 2.13.5
- scala_job:
name: 3.0.0-RC1
name: 3.0.0-RC2
java_version: jdk8
scala_version: 3.0.0-RC1
scala_version: 3.0.0-RC2
- scala_job:
name: 3.0.0-M3
name: 3.0.0-RC1
java_version: jdk8
scala_version: 3.0.0-M3
scala_version: 3.0.0-RC1
- scala_job:
name: jdk11_2.12
java_version: jdk11
Expand All @@ -137,19 +134,7 @@ workflows:
- scala_job:
name: jdk11_3.0
java_version: jdk11
scala_version: 3.0.0-RC1
- scala_job:
name: jdk15_2.12
java_version: jdk15
scala_version: 2.12.13
- scala_job:
name: jdk15_2.13
java_version: jdk15
scala_version: 2.13.5
- scala_job:
name: jdk15_3.0
java_version: jdk15
scala_version: 3.0.0-RC1
scala_version: 3.0.0-RC2
- scala_job:
name: jdk16_2.12
java_version: jdk16
Expand All @@ -161,7 +146,7 @@ workflows:
- scala_job:
name: jdk16_3.0
java_version: jdk16
scala_version: 3.0.0-RC1
scala_version: 3.0.0-RC2
- scalajs_job:
name: sjs1.0_2.12
scala_version: 2.12.13
Expand Down
8 changes: 4 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import: scala/scala-dev:travis/default.yml
language: scala

scala:
- 3.0.0-RC2
- 3.0.0-RC1
- 3.0.0-M3
- 2.12.13
- 2.13.5

Expand All @@ -15,14 +15,14 @@ env:
- SCALAJS_VERSION=1.5.0 ADOPTOPENJDK=8
- SCALANATIVE_VERSION=0.4.0 ADOPTOPENJDK=8
- SCALAJS_VERSION= ADOPTOPENJDK=11
- SCALAJS_VERSION= ADOPTOPENJDK=15
- SCALAJS_VERSION= ADOPTOPENJDK=16

jobs:
exclude:
- scala: 3.0.0-M3
env: SCALANATIVE_VERSION=0.4.0 ADOPTOPENJDK=8
- scala: 3.0.0-RC1
env: SCALANATIVE_VERSION=0.4.0 ADOPTOPENJDK=8
- scala: 3.0.0-RC2
env: SCALANATIVE_VERSION=0.4.0 ADOPTOPENJDK=8

install:
- git fetch --tags # get all tags for sbt-dynver
Expand Down
42 changes: 18 additions & 24 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -32,23 +32,17 @@ lazy val xml = crossProject(JSPlatform, JVMPlatform, NativePlatform)
.jvmSettings(ScalaModulePlugin.scalaModuleOsgiSettings)
.settings(
name := "scala-xml",
scalacOptions ++= {
val opts =
if (isDotty.value)
"-language:Scala2"
else
// Compiler team advised avoiding the -Xsource:2.14 option for releases.
// The output with -Xsource should be periodically checked, though.
"-deprecation:false -feature -Xlint:-stars-align,-nullary-unit,_"
opts.split("\\s+").to[Seq]
},
scalacOptions ++= (CrossVersion.partialVersion(scalaVersion.value) match {
case Some((3, _)) =>
Seq("-language:Scala2")
case _ =>
// Compiler team advised avoiding the -Xsource:2.14 option for releases.
// The output with -Xsource should be periodically checked, though.
Seq("-deprecation:false", "-feature", "-Xlint:-stars-align,-nullary-unit,_")
}),

Test / scalacOptions += "-Xxml:coalescing",

// don't run Dottydoc, it errors and isn't needed anyway.
// but we leave `publishArtifact` set to true, otherwise Sonatype won't let us publish
Compile / doc / sources := (if (isDotty.value) Seq() else (Compile / doc/ sources).value),

headerLicense := Some(HeaderLicense.Custom(
s"""|Scala (https://www.scala-lang.org)
|
Expand All @@ -61,11 +55,11 @@ lazy val xml = crossProject(JSPlatform, JVMPlatform, NativePlatform)
|additional information regarding copyright ownership.
|""".stripMargin)),

scalaModuleMimaPreviousVersion := {
scalaModuleMimaPreviousVersion := (CrossVersion.partialVersion(scalaVersion.value) match {
// pending resolution of https://github.com/scalacenter/sbt-version-policy/issues/62
if (isDotty.value) None
else Some("2.0.0-M5")
},
case Some((3, _)) => None
case _ => Some("2.0.0-M5")
}),
mimaBinaryIssueFilters ++= {
import com.typesafe.tools.mima.core._
import com.typesafe.tools.mima.core.ProblemFilters._
Expand All @@ -74,8 +68,8 @@ lazy val xml = crossProject(JSPlatform, JVMPlatform, NativePlatform)
exclude[DirectMissingMethodProblem]("scala.xml.Utility.escapeText"),
// New MiMa checks for generic signature changes
exclude[IncompatibleSignatureProblem]("*"),
// afaict this is just a JDK 8 vs 15 difference, producing a false positive when
// we compare classes built on JDK 15 (which we only do on CI, not at release time)
// afaict this is just a JDK 8 vs 16 difference, producing a false positive when
// we compare classes built on JDK 16 (which we only do on CI, not at release time)
// to previous-version artifacts that were built on 8. see scala/scala-xml#501
exclude[DirectMissingMethodProblem]("scala.xml.include.sax.XIncluder.declaration"),
)
Expand Down Expand Up @@ -115,12 +109,12 @@ lazy val xml = crossProject(JSPlatform, JVMPlatform, NativePlatform)
libraryDependencies += "junit" % "junit" % "4.13.2" % Test,
libraryDependencies += "com.novocode" % "junit-interface" % "0.11" % Test,
libraryDependencies += "org.apache.commons" % "commons-lang3" % "3.12.0" % Test,
libraryDependencies ++= {
if (isDotty.value)
libraryDependencies ++= (CrossVersion.partialVersion(scalaVersion.value) match {
case Some((3, _)) =>
Seq()
else
case _ =>
Seq(("org.scala-lang" % "scala-compiler" % scalaVersion.value % Test).exclude("org.scala-lang.modules", s"scala-xml_${scalaBinaryVersion.value}"))
}
}),
)
.jsSettings(
// Scala.js cannot run forked tests
Expand Down
2 changes: 1 addition & 1 deletion project/build.properties
Original file line number Diff line number Diff line change
@@ -1 +1 @@
sbt.version=1.4.9
sbt.version=1.5.0-RC2
1 change: 0 additions & 1 deletion project/plugins.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,5 @@ addSbtPlugin("org.portable-scala" % "sbt-scalajs-crossproject" % "1.0.0")
addSbtPlugin("org.portable-scala" % "sbt-scala-native-crossproject" % "1.0.0")
addSbtPlugin("org.scala-js" % "sbt-scalajs" % scalaJSVersion)
addSbtPlugin("org.scala-native" % "sbt-scala-native" % scalaNativeVersion)
addSbtPlugin("ch.epfl.lamp" % "sbt-dotty" % "0.5.3")
addSbtPlugin("de.heikoseeberger" % "sbt-header" % "5.6.0")
addSbtPlugin("ch.epfl.scala" % "sbt-version-policy" % "1.0.0-RC5")