diff --git a/.circleci/config.yml b/.circleci/config.yml index 290ef709..bf3e3a69 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -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 @@ -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 @@ -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 @@ -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 diff --git a/.travis.yml b/.travis.yml index 79d410a7..656829ae 100644 --- a/.travis.yml +++ b/.travis.yml @@ -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 @@ -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 diff --git a/build.sbt b/build.sbt index cad4936a..087e7b03 100644 --- a/build.sbt +++ b/build.sbt @@ -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) | @@ -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._ @@ -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"), ) @@ -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 diff --git a/project/build.properties b/project/build.properties index dbae93bc..af4ff6f2 100644 --- a/project/build.properties +++ b/project/build.properties @@ -1 +1 @@ -sbt.version=1.4.9 +sbt.version=1.5.0-RC2 diff --git a/project/plugins.sbt b/project/plugins.sbt index f3aa6c35..d4186c1e 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -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")