From 57bc4c6b69712e181445c815b24b1dc3f8349d82 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Marks?= Date: Thu, 21 Apr 2022 10:47:52 +0200 Subject: [PATCH 1/4] Revert "-Yscala-release support: extend community build with basic forward-compat tests (compiling selected projects with "-Yscala-release 3.0")" This reverts commit e39b618f9a9a1c4f306b1abfbfdb740758f5b37c. --- .github/workflows/ci.yaml | 7 + .../communitybuild/CommunityBuildRunner.scala | 5 +- .../src/scala/dotty/communitybuild/Main.scala | 2 +- .../scala/dotty/communitybuild/projects.scala | 230 +++++++++--------- .../communitybuild/CommunityBuildTest.scala | 14 -- .../sbtplugin/CommunityBuildPlugin.scala | 29 +-- 6 files changed, 134 insertions(+), 153 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 91add81f44ae..2ad5f18b1787 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -363,6 +363,7 @@ jobs: git submodule update --init --recursive --jobs 7 ./project/scripts/sbt "community-build/testOnly dotty.communitybuild.CommunityBuildTestC" +<<<<<<< HEAD - name: Show dependency tracking file if: ${{ always() }} run: cat community-build/dotty-community-build-deps || true @@ -410,6 +411,8 @@ jobs: git submodule update --init --recursive --jobs 7 ./project/scripts/sbt "community-build/testOnly dotty.communitybuild.CommunityBuildTestForwardCompat" +======= +>>>>>>> parent of e39b618f9a (-Yscala-release support: extend community build with basic forward-compat tests (compiling selected projects with "-Yscala-release 3.0")) test_sbt: runs-on: [self-hosted, Linux] container: @@ -509,7 +512,11 @@ jobs: - ${{ github.workspace }}/../../cache/sbt:/root/.sbt - ${{ github.workspace }}/../../cache/ivy:/root/.ivy2/cache - ${{ github.workspace }}/../../cache/general:/root/.cache +<<<<<<< HEAD needs: [test_non_bootstrapped, test, mima, community_build_a, community_build_b, community_build_c, community_build_forward_compat, test_sbt, test_java8] +======= + needs: [test_non_bootstrapped, test, community_build_a, community_build_b, community_build_c, test_sbt, test_java8] +>>>>>>> parent of e39b618f9a (-Yscala-release support: extend community build with basic forward-compat tests (compiling selected projects with "-Yscala-release 3.0")) if: "(github.event_name == 'schedule' || github.event_name == 'workflow_dispatch') && github.repository == 'lampepfl/dotty'" env: NIGHTLYBUILD: yes diff --git a/community-build/src/scala/dotty/communitybuild/CommunityBuildRunner.scala b/community-build/src/scala/dotty/communitybuild/CommunityBuildRunner.scala index d60def1a28f1..6a0c54c4b00b 100644 --- a/community-build/src/scala/dotty/communitybuild/CommunityBuildRunner.scala +++ b/community-build/src/scala/dotty/communitybuild/CommunityBuildRunner.scala @@ -17,10 +17,10 @@ object CommunityBuildRunner: * for more infrastructural details. */ extension (self: CommunityProject) def run()(using suite: CommunityBuildRunner): Unit = - if self.requiresExperimental && !self.compilerSupportExperimental then + if self.requiresExperimental && !compilerSupportExperimental then log(s"Skipping ${self.project} - it needs experimental features unsupported in this build.") return - self.dependencies().foreach(_.publish()) + self.dependencies.foreach(_.publish()) self.testOnlyDependencies().foreach(_.publish()) suite.runProject(self) @@ -45,7 +45,6 @@ trait CommunityBuildRunner: val project = projectDef.project val command = projectDef.binaryName val arguments = projectDef.buildCommands - val compilerVersion = projectDef.compilerVersion @annotation.tailrec def execTimes(task: () => Int, timesToRerun: Int): Boolean = diff --git a/community-build/src/scala/dotty/communitybuild/Main.scala b/community-build/src/scala/dotty/communitybuild/Main.scala index 7c3a39261eb0..852cee46af22 100644 --- a/community-build/src/scala/dotty/communitybuild/Main.scala +++ b/community-build/src/scala/dotty/communitybuild/Main.scala @@ -57,7 +57,7 @@ object Main: val (toRun, ignored) = allProjects.partition( p => p.docCommand != null - && (!p.requiresExperimental || p.compilerSupportExperimental) + && (!p.requiresExperimental || compilerSupportExperimental) ) val paths = toRun.map { project => diff --git a/community-build/src/scala/dotty/communitybuild/projects.scala b/community-build/src/scala/dotty/communitybuild/projects.scala index c5e7997d0b21..74510f3a3c5b 100644 --- a/community-build/src/scala/dotty/communitybuild/projects.scala +++ b/community-build/src/scala/dotty/communitybuild/projects.scala @@ -6,10 +6,13 @@ import java.nio.charset.StandardCharsets.UTF_8 lazy val communitybuildDir: Path = Paths.get(sys.props("user.dir")) -lazy val testedCompilerVersion: String = +lazy val compilerVersion: String = val file = communitybuildDir.resolve("scala3-bootstrapped.version") new String(Files.readAllBytes(file), UTF_8) +lazy val compilerSupportExperimental: Boolean = + compilerVersion.contains("SNAPSHOT") || compilerVersion.contains("NIGHTLY") + lazy val sbtPluginFilePath: String = // Workaround for https://github.com/sbt/sbt/issues/4395 new File(sys.props("user.home") + "/.sbt/1.0/plugins").mkdirs() @@ -36,21 +39,17 @@ sealed trait CommunityProject: val testCommand: String val publishCommand: String val docCommand: String - val dependencies: () => List[CommunityProject] + val dependencies: List[CommunityProject] val testOnlyDependencies: () => List[CommunityProject] val binaryName: String val runCommandsArgs: List[String] = Nil val requiresExperimental: Boolean val environment: Map[String, String] = Map.empty - val compilerVersion: String final val projectDir = communitybuildDir.resolve("community-projects").resolve(project) - final val compilerSupportExperimental: Boolean = - compilerVersion.contains("SNAPSHOT") || compilerVersion.contains("NIGHTLY") - final def publishDependencies(): Unit = - dependencies().foreach(_.publish()) + dependencies.foreach(_.publish()) /** Publish this project to the local Maven repository */ final def publish(): Unit = @@ -88,11 +87,10 @@ end CommunityProject final case class MillCommunityProject( project: String, baseCommand: String, - dependencies: () => List[CommunityProject] = () => Nil, + dependencies: List[CommunityProject] = Nil, testOnlyDependencies: () => List[CommunityProject] = () => Nil, ignoreDocs: Boolean = false, requiresExperimental: Boolean = false, - compilerVersion: String = testedCompilerVersion ) extends CommunityProject: override val binaryName: String = "./mill" override val testCommand = s"$baseCommand.test" @@ -107,14 +105,12 @@ final case class SbtCommunityProject( project: String, sbtTestCommand: String, extraSbtArgs: List[String] = Nil, - dependencies: () => List[CommunityProject] = () => Nil, + dependencies: List[CommunityProject] = Nil, testOnlyDependencies: () => List[CommunityProject] = () => Nil, sbtPublishCommand: String = null, sbtDocCommand: String = null, scalacOptions: List[String] = SbtCommunityProject.scalacOptions, requiresExperimental: Boolean = false, - compilerVersion: String = testedCompilerVersion, - isForwardCompatProject: Boolean = false ) extends CommunityProject: override val binaryName: String = "sbt" @@ -123,7 +119,6 @@ final case class SbtCommunityProject( private val baseCommand = "clean; set Global/logLevel := Level.Error; set Global/updateOptions ~= (_.withLatestSnapshots(false)); " - ++ (if isForwardCompatProject then "set Global / isForwardCompatProject := true; " else "") ++ (if scalacOptions.isEmpty then "" else s"""set Global/scalacOptions ++= $scalacOptionsString;""") ++ s"++$compilerVersion!; " @@ -151,6 +146,7 @@ final case class SbtCommunityProject( s"--addPluginSbtFile=$sbtPluginFilePath" ) +<<<<<<< HEAD def forwardCompat: SbtCommunityProject = this.copy( project = project + "-forward-compat", @@ -164,6 +160,8 @@ final case class SbtCommunityProject( scalacOptions = scalacOptions ++ Seq("-scala-output-version", release) ) +======= +>>>>>>> parent of e39b618f9a (-Yscala-release support: extend community build with basic forward-compat tests (compiling selected projects with "-Yscala-release 3.0")) object SbtCommunityProject: def scalacOptions = List( "-Xcheck-macros", @@ -184,89 +182,89 @@ object projects: lazy val utest = MillCommunityProject( project = "utest", - baseCommand = s"utest.jvm[$testedCompilerVersion]", + baseCommand = s"utest.jvm[$compilerVersion]", ignoreDocs = true ) lazy val sourcecode = MillCommunityProject( project = "sourcecode", - baseCommand = s"sourcecode.jvm[$testedCompilerVersion]", + baseCommand = s"sourcecode.jvm[$compilerVersion]", ignoreDocs = true ) lazy val oslib = MillCommunityProject( project = "os-lib", - baseCommand = s"os.jvm[$testedCompilerVersion]", - dependencies = () => List(utest, sourcecode) + baseCommand = s"os.jvm[$compilerVersion]", + dependencies = List(utest, sourcecode) ) lazy val oslibWatch = MillCommunityProject( project = "os-lib", - baseCommand = s"os.watch[$testedCompilerVersion]", - dependencies = () => List(utest, sourcecode), + baseCommand = s"os.watch[$compilerVersion]", + dependencies = List(utest, sourcecode), ignoreDocs = true ) lazy val ujson = MillCommunityProject( project = "upickle", - baseCommand = s"ujson.jvm[$testedCompilerVersion]", - dependencies = () => List(geny) + baseCommand = s"ujson.jvm[$compilerVersion]", + dependencies = List(geny) ) lazy val upickle = MillCommunityProject( project = "upickle", - baseCommand = s"upickle.jvm[$testedCompilerVersion]", - dependencies = () => List(geny, utest) + baseCommand = s"upickle.jvm[$compilerVersion]", + dependencies = List(geny, utest) ) lazy val upickleCore = MillCommunityProject( project = "upickle", - baseCommand = s"core.jvm[$testedCompilerVersion]", - dependencies = () => List(geny, utest) + baseCommand = s"core.jvm[$compilerVersion]", + dependencies = List(geny, utest) ) lazy val upickleImplicits = MillCommunityProject( project = "upickle", - baseCommand = s"implicits.jvm[$testedCompilerVersion]", - dependencies = () => List(upickleCore, ujson) + baseCommand = s"implicits.jvm[$compilerVersion]", + dependencies = List(upickleCore, ujson) ) lazy val upack = MillCommunityProject( project = "upickle", - baseCommand = s"upack.jvm[$testedCompilerVersion]", - dependencies = () => List(ujson, upickleCore) + baseCommand = s"upack.jvm[$compilerVersion]", + dependencies = List(ujson, upickleCore) ) lazy val geny = MillCommunityProject( project = "geny", - baseCommand = s"geny.jvm[$testedCompilerVersion]", - dependencies = () => List(utest) + baseCommand = s"geny.jvm[$compilerVersion]", + dependencies = List(utest) ) lazy val fansi = MillCommunityProject( project = "fansi", - baseCommand = s"fansi.jvm[$testedCompilerVersion]", - dependencies = () => List(utest, sourcecode), + baseCommand = s"fansi.jvm[$compilerVersion]", + dependencies = List(utest, sourcecode), ignoreDocs = true ) lazy val pprint = MillCommunityProject( project = "PPrint", - baseCommand = s"pprint.jvm[$testedCompilerVersion]", - dependencies = () => List(fansi), + baseCommand = s"pprint.jvm[$compilerVersion]", + dependencies = List(fansi), ignoreDocs = true ) lazy val requests = MillCommunityProject( project = "requests-scala", - baseCommand = s"requests[$testedCompilerVersion]", - dependencies = () => List(geny, utest, ujson, upickleCore) + baseCommand = s"requests[$compilerVersion]", + dependencies = List(geny, utest, ujson, upickleCore) ) lazy val cask = MillCommunityProject( project = "cask", - baseCommand = s"cask[$testedCompilerVersion]", - dependencies = () => List(utest, geny, sourcecode, pprint, upickle, upickleImplicits, upack, requests) + baseCommand = s"cask[$compilerVersion]", + dependencies = List(utest, geny, sourcecode, pprint, upickle, upickleImplicits, upack, requests) ) lazy val scas = MillCommunityProject( @@ -288,8 +286,6 @@ object projects: sbtDocCommand = forceDoc("jvm") ) - lazy val scalacheckForwardCompat = scalacheck.forwardCompat.withScalaRelease("3.0") - lazy val scalatest: SbtCommunityProject = SbtCommunityProject( project = "scalatest", sbtTestCommand = @@ -310,7 +306,7 @@ object projects: // org.scalatest.Outcome // Problem parsing scalatest.dotty/target/scala-3.0.0-M2/src_managed/main/org/scalatest/concurrent/ConductorFixture.scala:[602..624..3843], documentation may not be generated. // dotty.tools.dotc.core.MissingType: - dependencies = () => List(scalaXml), + dependencies = List(scalaXml), testOnlyDependencies = () => List(scalatestplusJunit, scalatestplusTestNG) ) @@ -319,21 +315,21 @@ object projects: sbtTestCommand = "scalatestPlusScalaCheckJVM/test", sbtPublishCommand = "scalatestPlusScalaCheckJVM/publishLocal", sbtDocCommand = "scalatestPlusScalaCheckJVM/doc", - dependencies = () => List(scalatest, scalacheck) + dependencies = List(scalatest, scalacheck) ) lazy val scalatestplusJunit = SbtCommunityProject( project = "scalatestplus-junit", sbtTestCommand = "scalatestplus-junit/test", sbtPublishCommand = "scalatestplus-junit/publishLocal", - dependencies = () => List(scalatest) + dependencies = List(scalatest) ) lazy val scalatestplusTestNG = SbtCommunityProject( project = "scalatestplus-testng", sbtTestCommand = "test", sbtPublishCommand = "publishLocal", - dependencies = () => List(scalatest) + dependencies = List(scalatest) ) lazy val scalaXml = SbtCommunityProject( @@ -369,7 +365,7 @@ object projects: project = "minitest", sbtTestCommand = "test", sbtDocCommand = aggregateDoc("lawsJVM")("minitestJVM"), - dependencies = () => List(scalacheck) + dependencies = List(scalacheck) ) lazy val fastparse = SbtCommunityProject( @@ -428,15 +424,19 @@ object projects: project = "sconfig", sbtTestCommand = "sconfigJVM/test", sbtDocCommand = "sconfigJVM/doc", - dependencies = () => List(scalaCollectionCompat) + dependencies = List(scalaCollectionCompat) ) lazy val zio = SbtCommunityProject( project = "zio", sbtTestCommand = "testJVMDotty", sbtDocCommand = forceDoc("coreJVM"), +<<<<<<< HEAD scalacOptions = SbtCommunityProject.scalacOptions.filter(_ != "-Xcheck-macros"), dependencies = () => List(izumiReflect) +======= + dependencies = List(izumiReflect) +>>>>>>> parent of e39b618f9a (-Yscala-release support: extend community build with basic forward-compat tests (compiling selected projects with "-Yscala-release 3.0")) ) lazy val munit = SbtCommunityProject( @@ -444,17 +444,15 @@ object projects: sbtTestCommand = "testsJVM/test;testsJS/test;", sbtPublishCommand = "munitJVM/publishLocal; munitJS/publishLocal; munitScalacheckJVM/publishLocal; munitScalacheckJS/publishLocal; junit/publishLocal", sbtDocCommand = "junit/doc; munitJVM/doc", - dependencies = () => List(scalacheck) + dependencies = List(scalacheck) ) - lazy val munitForwardCompat = munit.forwardCompat.withScalaRelease("3.0") - lazy val scodecBits = SbtCommunityProject( project = "scodec-bits", sbtTestCommand = "coreJVM/test;coreJS/test", sbtPublishCommand = "coreJVM/publishLocal;coreJS/publishLocal", sbtDocCommand = "coreJVM/doc", - dependencies = () => List(munit), + dependencies = List(munit), ) lazy val scodec = SbtCommunityProject( @@ -462,8 +460,12 @@ object projects: sbtTestCommand = "unitTests/test", // Adds package sbtDocCommand = "coreJVM/doc", +<<<<<<< HEAD scalacOptions = SbtCommunityProject.scalacOptions.filter(_ != "-Ysafe-init"), dependencies = () => List(munit, scodecBits), +======= + dependencies = List(munit, scodecBits), +>>>>>>> parent of e39b618f9a (-Yscala-release support: extend community build with basic forward-compat tests (compiling selected projects with "-Yscala-release 3.0")) ) lazy val scalaParserCombinators = SbtCommunityProject( @@ -496,7 +498,7 @@ object projects: // [error] class scalaz.iteratee.Iteratee cannot be unpickled because no class file was found sbtDocCommand = forceDoc("effectJVM"), - dependencies = () => List(scalacheck) + dependencies = List(scalacheck) ) lazy val endpoints4s = SbtCommunityProject( @@ -510,16 +512,19 @@ object projects: sbtTestCommand = "ciJVM", sbtPublishCommand = "publishLocal", sbtDocCommand = ";coreJVM/doc ;lawsJVM/doc ;kernelJVM/doc", - dependencies = () => List(cats, coop, disciplineSpecs2, scalacheck) + dependencies = List(cats, coop, disciplineSpecs2, scalacheck) ) +<<<<<<< HEAD lazy val catsEffect3ForwardCompat = catsEffect3.forwardCompat.copy(compilerVersion = "3.0.2") +======= +>>>>>>> parent of e39b618f9a (-Yscala-release support: extend community build with basic forward-compat tests (compiling selected projects with "-Yscala-release 3.0")) lazy val scalaParallelCollections = SbtCommunityProject( project = "scala-parallel-collections", sbtTestCommand = "test", sbtDocCommand = forceDoc("core"), - dependencies = () => List(scalacheck) + dependencies = List(scalacheck) ) lazy val scalaCollectionCompat = SbtCommunityProject( @@ -531,8 +536,8 @@ object projects: lazy val scalaJava8Compat = SbtCommunityProject( project = "scala-java8-compat", // the fnGen subproject must be built with 2.12.x - sbtTestCommand = s"++2.12.14; ++$testedCompilerVersion; set fnGen/dependencyOverrides := Nil; test", - sbtPublishCommand = s"++2.12.14; ++$testedCompilerVersion; set fnGen/dependencyOverrides := Nil; publishLocal", + sbtTestCommand = s"++2.12.14; ++$compilerVersion; set fnGen/dependencyOverrides := Nil; test", + sbtPublishCommand = s"++2.12.14; ++$compilerVersion; set fnGen/dependencyOverrides := Nil; publishLocal", scalacOptions = Nil // avoid passing Scala 3 options to Scala 2.12 in fnGen subproject ) @@ -547,82 +552,77 @@ object projects: project = "discipline", sbtTestCommand = "coreJVM/test;coreJS/test", sbtPublishCommand = "set every credentials := Nil;coreJVM/publishLocal;coreJS/publishLocal", +<<<<<<< HEAD scalacOptions = SbtCommunityProject.scalacOptions.filter(_ != "-Ysafe-init"), dependencies = () => List(scalacheck) +======= + dependencies = List(scalacheck) +>>>>>>> parent of e39b618f9a (-Yscala-release support: extend community build with basic forward-compat tests (compiling selected projects with "-Yscala-release 3.0")) ) - lazy val disciplineForwardCompat = discipline.forwardCompat.withScalaRelease("3.0") - lazy val disciplineMunit = SbtCommunityProject( project = "discipline-munit", sbtTestCommand = "coreJVM/test;coreJS/test", sbtPublishCommand = "coreJVM/publishLocal;coreJS/publishLocal", - dependencies = () => List(discipline, munit) + dependencies = List(discipline, munit) ) - lazy val disciplineMunitForwardCompat = disciplineMunit.forwardCompat.withScalaRelease("3.0") - lazy val disciplineSpecs2 = SbtCommunityProject( project = "discipline-specs2", sbtTestCommand = "test", sbtPublishCommand = "coreJVM/publishLocal;coreJS/publishLocal", - dependencies = () => List(discipline), + dependencies = List(discipline), scalacOptions = SbtCommunityProject.scalacOptions.filter(_ != "-Ysafe-init") ) - lazy val disciplineSpecs2ForwardCompat = disciplineSpecs2.forwardCompat.withScalaRelease("3.0") - lazy val simulacrumScalafixAnnotations = SbtCommunityProject( project = "simulacrum-scalafix", sbtTestCommand = "annotation/test:compile;annotationJS/test:compile", sbtPublishCommand = "annotation/publishLocal;annotationJS/publishLocal", ) - lazy val simulacrumScalafixAnnotationsForwardCompat = simulacrumScalafixAnnotations.forwardCompat.withScalaRelease("3.0") - lazy val cats = SbtCommunityProject( project = "cats", sbtTestCommand = "set Global/scalaJSStage := FastOptStage;buildJVM;validateAllJS", sbtPublishCommand = "catsJVM/publishLocal;catsJS/publishLocal", - dependencies = () => List(discipline, disciplineMunit, scalacheck, simulacrumScalafixAnnotations), + dependencies = List(discipline, disciplineMunit, scalacheck, simulacrumScalafixAnnotations), scalacOptions = SbtCommunityProject.scalacOptions.filter(_ != "-Ysafe-init") // disable -Ysafe-init, due to -Xfatal-warning ) - lazy val catsForwardCompat = cats.forwardCompat.withScalaRelease("3.0") - lazy val catsMtl = SbtCommunityProject( project = "cats-mtl", sbtTestCommand = "testsJVM/test;testsJS/test", sbtPublishCommand = "coreJVM/publishLocal;coreJS/publishLocal;lawsJVM/publishLocal;lawsJS/publishLocal", - dependencies = () => List(cats, disciplineMunit) + dependencies = List(cats, disciplineMunit) ) +<<<<<<< HEAD lazy val catsMtlForwardCompat = catsMtl.forwardCompat.copy(compilerVersion = "3.0.2") +======= +>>>>>>> parent of e39b618f9a (-Yscala-release support: extend community build with basic forward-compat tests (compiling selected projects with "-Yscala-release 3.0")) lazy val coop = SbtCommunityProject( project = "coop", sbtTestCommand = "test", sbtPublishCommand = "coreJVM/publishLocal;coreJS/publishLocal", - dependencies = () => List(cats, catsMtl) + dependencies = List(cats, catsMtl) ) - lazy val coopForwardCompat = coop.forwardCompat.withScalaRelease("3.0") - // 'Sciss/Lucre' with its dependencies: lazy val scissEqual = SbtCommunityProject( project = "Equal", sbtTestCommand = "rootJVM/test", sbtPublishCommand = "rootJVM/publishLocal", - dependencies = () => List(scalatest), + dependencies = List(scalatest), ) lazy val scissFingerTree = SbtCommunityProject( project = "FingerTree", sbtTestCommand = "rootJVM/test", sbtPublishCommand = "rootJVM/publishLocal", - dependencies = () => List(scalatest), + dependencies = List(scalatest), ) lazy val scissLog = SbtCommunityProject( @@ -635,57 +635,62 @@ object projects: project = "Model", sbtTestCommand = "rootJVM/test", sbtPublishCommand = "rootJVM/publishLocal", - dependencies = () => List(scalatest), + dependencies = List(scalatest), ) lazy val scissNumbers = SbtCommunityProject( project = "Numbers", sbtTestCommand = "rootJVM/test", sbtPublishCommand = "rootJVM/publishLocal", - dependencies = () => List(scalatest), + dependencies = List(scalatest), ) lazy val scissSerial = SbtCommunityProject( project = "Serial", sbtTestCommand = "rootJVM/test", sbtPublishCommand = "rootJVM/publishLocal", - dependencies = () => List(scalatest), + dependencies = List(scalatest), ) lazy val scissAsyncFile = SbtCommunityProject( project = "AsyncFile", sbtTestCommand = "rootJVM/test", sbtPublishCommand = "rootJVM/publishLocal", - dependencies = () => List(scissLog, scalatest), + dependencies = List(scissLog, scalatest), ) lazy val scissSpan = SbtCommunityProject( project = "Span", sbtTestCommand = "rootJVM/test", sbtPublishCommand = "rootJVM/publishLocal", - dependencies = () => List(scissSerial, scalatest), + dependencies = List(scissSerial, scalatest), ) lazy val scalaSTM = SbtCommunityProject( project = "scala-stm", sbtTestCommand = "rootJVM/test", sbtPublishCommand = "rootJVM/publishLocal", - dependencies = () => List(scalatestplusJunit), + dependencies = List(scalatestplusJunit), ) lazy val scissLucre = SbtCommunityProject( project = "Lucre", sbtTestCommand = "adjunctJVM/test;baseJVM/test;confluentJVM/test;coreJVM/test;dataJVM/test;exprJVM/test;geomJVM/test;lucre-bdb/test;testsJVM/test", extraSbtArgs = List("-Dde.sciss.lucre.ShortTests=true"), +<<<<<<< HEAD sbtPublishCommand = "adjunctJVM/publishLocal;baseJVM/publishLocal;confluentJVM/publishLocal;coreJVM/publishLocal;dataJVM/publishLocal;exprJVM/publishLocal;geomJVM/publishLocal;lucre-bdb/publishLocal", dependencies = () => List(scalaSTM, scissAsyncFile, scissEqual, scissFingerTree, scissLog, scissModel, scissNumbers, scissSerial, scissSpan, scalatest), +======= + sbtPublishCommand = "adjunctJVM/publishLocal;baseJVM/publishLocal;confluentJVM/publishLocal;coreJVM/publishLocal;dataJVM/publishLocal;expr0JVM/publishLocal;expr1JVM/publishLocal;exprJVM/publishLocal;geomJVM/publishLocal;lucre-bdb/publishLocal", + dependencies = List(scalaSTM, scissAsyncFile, scissEqual, scissFingerTree, scissLog, scissModel, scissNumbers, scissSerial, scissSpan, scalatest), +>>>>>>> parent of e39b618f9a (-Yscala-release support: extend community build with basic forward-compat tests (compiling selected projects with "-Yscala-release 3.0")) ) lazy val izumiReflect = SbtCommunityProject( project = "izumi-reflect", sbtTestCommand = "test", sbtPublishCommand = "publishLocal", - dependencies = () => List(scalatest) + dependencies = List(scalatest) ) lazy val perspective = SbtCommunityProject( @@ -693,11 +698,12 @@ object projects: // No library with easy typeclasses to verify data against exist for Dotty, so no tests yet // Until then I guess this mainly serves to check that it still compiles at all sbtTestCommand = "dottyPerspectiveExamples/compile", - dependencies = () => List(cats) + dependencies = List(cats) ) lazy val akka = SbtCommunityProject( project = "akka", +<<<<<<< HEAD extraSbtArgs = List(s"-Dakka.build.scalaVersion=$testedCompilerVersion"), sbtTestCommand = List( "set every targetSystemJdk := true", @@ -709,12 +715,17 @@ object projects: ).mkString("; "), scalacOptions = SbtCommunityProject.scalacOptions.filter(_ != "-Ysafe-init"), dependencies = () => List(scalatest, scalatestplusJunit, scalatestplusScalacheck) +======= + extraSbtArgs = List(s"-Dakka.build.scalaVersion=$compilerVersion"), + sbtTestCommand = "set every targetSystemJdk := true; akka-actor-tests/Test/compile", + dependencies = List(scalatest, scalatestplusJunit, scalatestplusScalacheck) +>>>>>>> parent of e39b618f9a (-Yscala-release support: extend community build with basic forward-compat tests (compiling selected projects with "-Yscala-release 3.0")) ) lazy val monocle = SbtCommunityProject( project = "Monocle", sbtTestCommand = "coreJVM/test; macrosJVM/test; testJVM/test", - dependencies = () => List(cats, munit, discipline, disciplineMunit) + dependencies = List(cats, munit, discipline, disciplineMunit) ) lazy val protoquill = SbtCommunityProject( @@ -722,7 +733,11 @@ object projects: extraSbtArgs = List("-Dcommunity=true", "-DcommunityRemote=true", "-Dquill.macro.stdout=true"), sbtTestCommand = "runCommunityBuild", sbtPublishCommand = "publishLocal", +<<<<<<< HEAD dependencies = () => List(scalatest), +======= + dependencies = List(), // TODO add scalatest and pprint (see protoquill/build.sbt) +>>>>>>> parent of e39b618f9a (-Yscala-release support: extend community build with basic forward-compat tests (compiling selected projects with "-Yscala-release 3.0")) scalacOptions = List("-language:implicitConversions"), // disabled -Ysafe-init, due to bug in macro ) @@ -730,65 +745,73 @@ object projects: project = "onnx-scala", sbtTestCommand = "test", sbtPublishCommand = "publishLocal", - dependencies = () => List(scalatest) + dependencies = List(scalatest) ) lazy val playJson = SbtCommunityProject( project = "play-json", sbtTestCommand = "test", sbtPublishCommand = "publishLocal", - dependencies = () => List(scalatest, scalatestplusScalacheck), + dependencies = List(scalatest, scalatestplusScalacheck), ) lazy val munitCatsEffect = SbtCommunityProject( project = "munit-cats-effect", sbtTestCommand = "ce3JVM/test; ce3JS/test", sbtPublishCommand = "ce3JVM/publishLocal; ce3JS/publishLocal", - dependencies = () => List(munit, catsEffect3) + dependencies = List(munit, catsEffect3) ) lazy val scalacheckEffect = SbtCommunityProject( project = "scalacheck-effect", sbtTestCommand = "test", sbtPublishCommand = "publishLocal", - dependencies = () => List(cats, catsEffect3, munit, scalacheck) + dependencies = List(cats, catsEffect3, munit, scalacheck) ) lazy val fs2 = SbtCommunityProject( project = "fs2", sbtTestCommand = "coreJVM/test; coreJS/test", // io/test requires JDK9+ sbtPublishCommand = "coreJVM/publishLocal; coreJS/publishLocal", +<<<<<<< HEAD scalacOptions = SbtCommunityProject.scalacOptions.filter(_ != "-Ysafe-init"), dependencies = () => List(cats, catsEffect3, munitCatsEffect, scalacheckEffect, scodecBits) +======= + dependencies = List(cats, catsEffect3, munitCatsEffect, scalacheckEffect, scodecBits) +>>>>>>> parent of e39b618f9a (-Yscala-release support: extend community build with basic forward-compat tests (compiling selected projects with "-Yscala-release 3.0")) ) lazy val libretto = SbtCommunityProject( project = "libretto", sbtTestCommand = "core/test; examples/compile", sbtPublishCommand = "core/publishLocal; examples/publishLocal", - dependencies = () => List(scalatest) + dependencies = List(scalatest) ) lazy val jacksonModuleScala = SbtCommunityProject( project = "jackson-module-scala", sbtTestCommand = "test", sbtPublishCommand = "publishLocal", - dependencies = () => List(scalaJava8Compat, scalatest) + dependencies = List(scalaJava8Compat, scalatest) ) lazy val specs2 = SbtCommunityProject( project = "specs2", sbtTestCommand = "core/testOnly -- exclude ci", sbtPublishCommand = "core/publishLocal", - dependencies = () => List() + dependencies = List() ) lazy val spire = SbtCommunityProject( project = "spire", sbtTestCommand = "test", sbtPublishCommand = "publishLocal", +<<<<<<< HEAD scalacOptions = SbtCommunityProject.scalacOptions.filter(_ != "-Xcheck-macros"), dependencies = () => List(cats, disciplineMunit) +======= + dependencies = List(cats, disciplineMunit) +>>>>>>> parent of e39b618f9a (-Yscala-release support: extend community build with basic forward-compat tests (compiling selected projects with "-Yscala-release 3.0")) ) lazy val http4s = SbtCommunityProject( @@ -801,19 +824,6 @@ object projects: end projects -lazy val forwardCompatMapping = Map[CommunityProject, CommunityProject]( - projects.scalacheck -> projects.scalacheckForwardCompat, - projects.munit -> projects.munitForwardCompat, - projects.discipline -> projects.disciplineForwardCompat, - projects.disciplineMunit -> projects.disciplineMunitForwardCompat, - projects.disciplineSpecs2 -> projects.disciplineSpecs2ForwardCompat, - projects.simulacrumScalafixAnnotations -> projects.simulacrumScalafixAnnotationsForwardCompat, - projects.cats -> projects.catsForwardCompat, - projects.catsMtl -> projects.catsMtlForwardCompat, - projects.coop -> projects.coopForwardCompat, - projects.catsEffect3 -> projects.catsEffect3ForwardCompat, -) - def allProjects = List( projects.utest, projects.sourcecode, @@ -832,7 +842,6 @@ def allProjects = List( projects.scas, projects.intent, projects.scalacheck, - projects.scalacheckForwardCompat, projects.scalatest, projects.scalatestplusScalacheck, projects.scalatestplusJunit, @@ -849,7 +858,6 @@ def allProjects = List( projects.sconfig, projects.zio, projects.munit, - projects.munitForwardCompat, projects.scodecBits, projects.scodec, projects.scalaParserCombinators, @@ -857,23 +865,16 @@ def allProjects = List( projects.scalaz, projects.endpoints4s, projects.catsEffect3, - projects.catsEffect3ForwardCompat, projects.scalaParallelCollections, projects.scalaCollectionCompat, projects.scalaJava8Compat, projects.verify, projects.discipline, - projects.disciplineForwardCompat, projects.disciplineMunit, - projects.disciplineMunitForwardCompat, projects.disciplineSpecs2, - projects.disciplineSpecs2ForwardCompat, projects.simulacrumScalafixAnnotations, - projects.simulacrumScalafixAnnotationsForwardCompat, projects.cats, - projects.catsForwardCompat, projects.catsMtl, - projects.catsMtlForwardCompat, projects.coop, projects.scissEqual, projects.scissFingerTree, @@ -899,10 +900,13 @@ def allProjects = List( projects.libretto, projects.jacksonModuleScala, projects.specs2, +<<<<<<< HEAD projects.coop, projects.coopForwardCompat, projects.spire, projects.http4s +======= +>>>>>>> parent of e39b618f9a (-Yscala-release support: extend community build with basic forward-compat tests (compiling selected projects with "-Yscala-release 3.0")) ) lazy val projectMap = allProjects.groupBy(_.project) diff --git a/community-build/test/scala/dotty/communitybuild/CommunityBuildTest.scala b/community-build/test/scala/dotty/communitybuild/CommunityBuildTest.scala index 5be7f936ab66..657d49db3172 100644 --- a/community-build/test/scala/dotty/communitybuild/CommunityBuildTest.scala +++ b/community-build/test/scala/dotty/communitybuild/CommunityBuildTest.scala @@ -100,17 +100,3 @@ class CommunityBuildTestC: @Test def verify = projects.verify.run() @Test def xmlInterpolator = projects.xmlInterpolator.run() end CommunityBuildTestC - -@Category(Array(classOf[TestCategory])) -class CommunityBuildTestForwardCompat: - @Test def catsEffect3ForwardCompat = projects.catsEffect3ForwardCompat.run() - @Test def catsForwardCompat = projects.catsForwardCompat.run() - @Test def catsMtlForwardCompat = projects.catsMtlForwardCompat.run() - @Test def coopForwardCompat = projects.coopForwardCompat.run() - @Test def disciplineForwardCompat = projects.disciplineForwardCompat.run() - @Test def disciplineMunitForwardCompat = projects.disciplineMunitForwardCompat.run() - @Test def disciplineSpecs2ForwardCompat = projects.disciplineSpecs2ForwardCompat.run() - @Test def munitForwardCompat = projects.munitForwardCompat.run() - @Test def scalacheckForwardCompat = projects.scalacheckForwardCompat.run() - @Test def simulacrumScalafixAnnotationsForwardCompat = projects.simulacrumScalafixAnnotationsForwardCompat.run() -end CommunityBuildTestForwardCompat diff --git a/sbt-community-build/src/dotty/communitybuild/sbtplugin/CommunityBuildPlugin.scala b/sbt-community-build/src/dotty/communitybuild/sbtplugin/CommunityBuildPlugin.scala index d6cebbfe3cac..fd9a6f48b9a8 100644 --- a/sbt-community-build/src/dotty/communitybuild/sbtplugin/CommunityBuildPlugin.scala +++ b/sbt-community-build/src/dotty/communitybuild/sbtplugin/CommunityBuildPlugin.scala @@ -15,16 +15,6 @@ object CommunityBuildPlugin extends AutoPlugin { override def requires = plugins.JvmPlugin override def trigger = allRequirements - object autoImport { - val isForwardCompatProject = settingKey[Boolean]("Is it a project used for testing forward binary compatibility?") - } - - import autoImport._ - - override val globalSettings: Seq[Setting[_]] = Seq( - isForwardCompatProject := false - ) - override val projectSettings: Seq[Setting[_]] = Seq( publishLocal := Def.taskDyn { val pubLocalResult = publishLocal.value @@ -33,22 +23,12 @@ object CommunityBuildPlugin extends AutoPlugin { CommunityBuildDependencies.publish(projectID.value) pubLocalResult } - }.value, - projectID := { - val id = projectID.value - if (isForwardCompatProject.value) { - val revision = if (id.revision.endsWith("-SNAPSHOT")) - id.revision.replace("-SNAPSHOT", "-forward-compat-SNAPSHOT") - else - id.revision + "-forward-compat" - id.withRevision(revision) - } else - id - } + }.value ) override val buildSettings: Seq[Setting[_]] = Seq( dependencyOverrides ++= { +<<<<<<< HEAD if (scalaVersion.value.startsWith("3.")) { val forwardCompatFilter: ModuleID => Boolean = if (isForwardCompatProject.value) (_.revision.contains("-forward-compat")) else (!_.revision.contains("-forward-compat")) val stdlibOverrides = Seq( @@ -57,6 +37,11 @@ object CommunityBuildPlugin extends AutoPlugin { ) CommunityBuildDependencies.allOverrides(sLog.value).filter(forwardCompatFilter) ++ stdlibOverrides } else Nil +======= + if (scalaVersion.value.startsWith("3.")) + CommunityBuildDependencies.allOverrides(sLog.value) + else Nil +>>>>>>> parent of e39b618f9a (-Yscala-release support: extend community build with basic forward-compat tests (compiling selected projects with "-Yscala-release 3.0")) } ) } From 35d9a7635280e815d9002f0c8762ac25e72e3a5e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Marks?= Date: Thu, 21 Apr 2022 10:49:29 +0200 Subject: [PATCH 2/4] Remove no longer needed submodules --- .gitmodules | 31 ------------------------------- 1 file changed, 31 deletions(-) diff --git a/.gitmodules b/.gitmodules index 971eb25a9466..aadf222714ad 100644 --- a/.gitmodules +++ b/.gitmodules @@ -216,37 +216,6 @@ [submodule "community-build/community-projects/spire"] path = community-build/community-projects/spire url = https://github.com/dotty-staging/spire.git -[submodule "community-build/community-projects/munit-forward-compat"] - path = community-build/community-projects/munit-forward-compat - url = https://github.com/dotty-staging/munit.git -[submodule "community-build/community-projects/discipline-forward-compat"] - path = community-build/community-projects/discipline-forward-compat - url = https://github.com/dotty-staging/discipline.git -[submodule "community-build/community-projects/discipline-munit-forward-compat"] - path = community-build/community-projects/discipline-munit-forward-compat - url = https://github.com/dotty-staging/discipline-munit.git -[submodule "community-build/community-projects/discipline-specs2-forward-compat"] - path = community-build/community-projects/discipline-specs2-forward-compat - url = https://github.com/dotty-staging/discipline-specs2.git -[submodule "community-build/community-projects/simulacrum-scalafix-forward-compat"] - path = community-build/community-projects/simulacrum-scalafix-forward-compat - url = https://github.com/dotty-staging/simulacrum-scalafix.git -[submodule "community-build/community-projects/cats-forward-compat"] - path = community-build/community-projects/cats-forward-compat - url = https://github.com/dotty-staging/cats.git -[submodule "community-build/community-projects/cats-mtl-forward-compat"] - path = community-build/community-projects/cats-mtl-forward-compat - url = https://github.com/dotty-staging/cats-mtl.git -[submodule "community-build/community-projects/coop-forward-compat"] - path = community-build/community-projects/coop-forward-compat - url = https://github.com/dotty-staging/coop.git -[submodule "community-build/community-projects/cats-effect-3-forward-compat"] - path = community-build/community-projects/cats-effect-3-forward-compat - url = https://github.com/dotty-staging/cats-effect.git - branch = series/3.x -[submodule "community-build/community-projects/scalacheck-forward-compat"] - path = community-build/community-projects/scalacheck-forward-compat - url = https://github.com/dotty-staging/scalacheck [submodule "community-build/community-projects/http4s"] path = community-build/community-projects/http4s url = https://github.com/dotty-staging/http4s.git From 944bf01885aac9eecd57ebd5d39a56395edc8ff6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Marks?= Date: Thu, 21 Apr 2022 11:10:18 +0200 Subject: [PATCH 3/4] Remove leftover merge conflicts --- .github/workflows/ci.yaml | 52 +------------ .../scala/dotty/communitybuild/projects.scala | 73 +------------------ .../sbtplugin/CommunityBuildPlugin.scala | 11 --- 3 files changed, 5 insertions(+), 131 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 2ad5f18b1787..08e28c0c4a2b 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -363,56 +363,10 @@ jobs: git submodule update --init --recursive --jobs 7 ./project/scripts/sbt "community-build/testOnly dotty.communitybuild.CommunityBuildTestC" -<<<<<<< HEAD - name: Show dependency tracking file if: ${{ always() }} run: cat community-build/dotty-community-build-deps || true - community_build_forward_compat: - runs-on: [self-hosted, Linux] - container: - image: lampepfl/dotty:2021-03-22 - options: --cpu-shares 4096 - volumes: - - ${{ github.workspace }}/../../cache/sbt:/root/.sbt - - ${{ github.workspace }}/../../cache/ivy:/root/.ivy2/cache - - ${{ github.workspace }}/../../cache/general:/root/.cache - if: "github.event_name == 'schedule' && github.repository == 'lampepfl/dotty' - || ( - github.event_name == 'pull_request' - && !contains(github.event.pull_request.body, '[skip ci]') - && !contains(github.event.pull_request.body, '[skip community_build]') - && contains(github.event.pull_request.body, '[test_forward_compat]') - ) - || ( - github.event_name == 'workflow_dispatch' - && github.repository == 'lampepfl/dotty' - )" - - steps: - - name: Reset existing repo - run: git -c "http.https://github.com/.extraheader=" fetch --recurse-submodules=no "https://github.com/lampepfl/dotty" && git reset --hard FETCH_HEAD || true - - - name: Checkout cleanup script - uses: actions/checkout@v2 - - - name: Cleanup - run: .github/workflows/cleanup.sh - - - name: Git Checkout - uses: actions/checkout@v2 - - - name: Add SBT proxy repositories - run: cp -vf .github/workflows/repositories /root/.sbt/ ; true - - - name: Test - run: | - git submodule sync - git submodule update --init --recursive --jobs 7 - ./project/scripts/sbt "community-build/testOnly dotty.communitybuild.CommunityBuildTestForwardCompat" - -======= ->>>>>>> parent of e39b618f9a (-Yscala-release support: extend community build with basic forward-compat tests (compiling selected projects with "-Yscala-release 3.0")) test_sbt: runs-on: [self-hosted, Linux] container: @@ -512,11 +466,7 @@ jobs: - ${{ github.workspace }}/../../cache/sbt:/root/.sbt - ${{ github.workspace }}/../../cache/ivy:/root/.ivy2/cache - ${{ github.workspace }}/../../cache/general:/root/.cache -<<<<<<< HEAD - needs: [test_non_bootstrapped, test, mima, community_build_a, community_build_b, community_build_c, community_build_forward_compat, test_sbt, test_java8] -======= - needs: [test_non_bootstrapped, test, community_build_a, community_build_b, community_build_c, test_sbt, test_java8] ->>>>>>> parent of e39b618f9a (-Yscala-release support: extend community build with basic forward-compat tests (compiling selected projects with "-Yscala-release 3.0")) + needs: [test_non_bootstrapped, test, mima, community_build_a, community_build_b, community_build_c, test_sbt, test_java8] if: "(github.event_name == 'schedule' || github.event_name == 'workflow_dispatch') && github.repository == 'lampepfl/dotty'" env: NIGHTLYBUILD: yes diff --git a/community-build/src/scala/dotty/communitybuild/projects.scala b/community-build/src/scala/dotty/communitybuild/projects.scala index 74510f3a3c5b..3a0ec6c280b7 100644 --- a/community-build/src/scala/dotty/communitybuild/projects.scala +++ b/community-build/src/scala/dotty/communitybuild/projects.scala @@ -146,22 +146,6 @@ final case class SbtCommunityProject( s"--addPluginSbtFile=$sbtPluginFilePath" ) -<<<<<<< HEAD - def forwardCompat: SbtCommunityProject = - this.copy( - project = project + "-forward-compat", - dependencies = () => dependencies().map(forwardCompatMapping), - testOnlyDependencies = () => testOnlyDependencies().map(forwardCompatMapping), - isForwardCompatProject = true - ) - - def withScalaRelease(release: String): SbtCommunityProject = - this.copy( - scalacOptions = scalacOptions ++ Seq("-scala-output-version", release) - ) - -======= ->>>>>>> parent of e39b618f9a (-Yscala-release support: extend community build with basic forward-compat tests (compiling selected projects with "-Yscala-release 3.0")) object SbtCommunityProject: def scalacOptions = List( "-Xcheck-macros", @@ -431,12 +415,8 @@ object projects: project = "zio", sbtTestCommand = "testJVMDotty", sbtDocCommand = forceDoc("coreJVM"), -<<<<<<< HEAD scalacOptions = SbtCommunityProject.scalacOptions.filter(_ != "-Xcheck-macros"), - dependencies = () => List(izumiReflect) -======= - dependencies = List(izumiReflect) ->>>>>>> parent of e39b618f9a (-Yscala-release support: extend community build with basic forward-compat tests (compiling selected projects with "-Yscala-release 3.0")) + dependencies =List(izumiReflect) ) lazy val munit = SbtCommunityProject( @@ -460,12 +440,8 @@ object projects: sbtTestCommand = "unitTests/test", // Adds package sbtDocCommand = "coreJVM/doc", -<<<<<<< HEAD scalacOptions = SbtCommunityProject.scalacOptions.filter(_ != "-Ysafe-init"), - dependencies = () => List(munit, scodecBits), -======= dependencies = List(munit, scodecBits), ->>>>>>> parent of e39b618f9a (-Yscala-release support: extend community build with basic forward-compat tests (compiling selected projects with "-Yscala-release 3.0")) ) lazy val scalaParserCombinators = SbtCommunityProject( @@ -515,11 +491,6 @@ object projects: dependencies = List(cats, coop, disciplineSpecs2, scalacheck) ) -<<<<<<< HEAD - lazy val catsEffect3ForwardCompat = catsEffect3.forwardCompat.copy(compilerVersion = "3.0.2") - -======= ->>>>>>> parent of e39b618f9a (-Yscala-release support: extend community build with basic forward-compat tests (compiling selected projects with "-Yscala-release 3.0")) lazy val scalaParallelCollections = SbtCommunityProject( project = "scala-parallel-collections", sbtTestCommand = "test", @@ -552,12 +523,8 @@ object projects: project = "discipline", sbtTestCommand = "coreJVM/test;coreJS/test", sbtPublishCommand = "set every credentials := Nil;coreJVM/publishLocal;coreJS/publishLocal", -<<<<<<< HEAD scalacOptions = SbtCommunityProject.scalacOptions.filter(_ != "-Ysafe-init"), - dependencies = () => List(scalacheck) -======= dependencies = List(scalacheck) ->>>>>>> parent of e39b618f9a (-Yscala-release support: extend community build with basic forward-compat tests (compiling selected projects with "-Yscala-release 3.0")) ) lazy val disciplineMunit = SbtCommunityProject( @@ -597,11 +564,6 @@ object projects: dependencies = List(cats, disciplineMunit) ) -<<<<<<< HEAD - lazy val catsMtlForwardCompat = catsMtl.forwardCompat.copy(compilerVersion = "3.0.2") - -======= ->>>>>>> parent of e39b618f9a (-Yscala-release support: extend community build with basic forward-compat tests (compiling selected projects with "-Yscala-release 3.0")) lazy val coop = SbtCommunityProject( project = "coop", sbtTestCommand = "test", @@ -677,13 +639,8 @@ object projects: project = "Lucre", sbtTestCommand = "adjunctJVM/test;baseJVM/test;confluentJVM/test;coreJVM/test;dataJVM/test;exprJVM/test;geomJVM/test;lucre-bdb/test;testsJVM/test", extraSbtArgs = List("-Dde.sciss.lucre.ShortTests=true"), -<<<<<<< HEAD sbtPublishCommand = "adjunctJVM/publishLocal;baseJVM/publishLocal;confluentJVM/publishLocal;coreJVM/publishLocal;dataJVM/publishLocal;exprJVM/publishLocal;geomJVM/publishLocal;lucre-bdb/publishLocal", - dependencies = () => List(scalaSTM, scissAsyncFile, scissEqual, scissFingerTree, scissLog, scissModel, scissNumbers, scissSerial, scissSpan, scalatest), -======= - sbtPublishCommand = "adjunctJVM/publishLocal;baseJVM/publishLocal;confluentJVM/publishLocal;coreJVM/publishLocal;dataJVM/publishLocal;expr0JVM/publishLocal;expr1JVM/publishLocal;exprJVM/publishLocal;geomJVM/publishLocal;lucre-bdb/publishLocal", dependencies = List(scalaSTM, scissAsyncFile, scissEqual, scissFingerTree, scissLog, scissModel, scissNumbers, scissSerial, scissSpan, scalatest), ->>>>>>> parent of e39b618f9a (-Yscala-release support: extend community build with basic forward-compat tests (compiling selected projects with "-Yscala-release 3.0")) ) lazy val izumiReflect = SbtCommunityProject( @@ -703,8 +660,7 @@ object projects: lazy val akka = SbtCommunityProject( project = "akka", -<<<<<<< HEAD - extraSbtArgs = List(s"-Dakka.build.scalaVersion=$testedCompilerVersion"), + extraSbtArgs = List(s"-Dakka.build.scalaVersion=$compilerVersion"), sbtTestCommand = List( "set every targetSystemJdk := true", // selectively disable -Xfatal-warnings due to deprecations @@ -714,12 +670,7 @@ object projects: "akka-actor-tests/Test/compile", ).mkString("; "), scalacOptions = SbtCommunityProject.scalacOptions.filter(_ != "-Ysafe-init"), - dependencies = () => List(scalatest, scalatestplusJunit, scalatestplusScalacheck) -======= - extraSbtArgs = List(s"-Dakka.build.scalaVersion=$compilerVersion"), - sbtTestCommand = "set every targetSystemJdk := true; akka-actor-tests/Test/compile", dependencies = List(scalatest, scalatestplusJunit, scalatestplusScalacheck) ->>>>>>> parent of e39b618f9a (-Yscala-release support: extend community build with basic forward-compat tests (compiling selected projects with "-Yscala-release 3.0")) ) lazy val monocle = SbtCommunityProject( @@ -733,11 +684,7 @@ object projects: extraSbtArgs = List("-Dcommunity=true", "-DcommunityRemote=true", "-Dquill.macro.stdout=true"), sbtTestCommand = "runCommunityBuild", sbtPublishCommand = "publishLocal", -<<<<<<< HEAD - dependencies = () => List(scalatest), -======= - dependencies = List(), // TODO add scalatest and pprint (see protoquill/build.sbt) ->>>>>>> parent of e39b618f9a (-Yscala-release support: extend community build with basic forward-compat tests (compiling selected projects with "-Yscala-release 3.0")) + dependencies = List(scalatest), scalacOptions = List("-language:implicitConversions"), // disabled -Ysafe-init, due to bug in macro ) @@ -773,12 +720,8 @@ object projects: project = "fs2", sbtTestCommand = "coreJVM/test; coreJS/test", // io/test requires JDK9+ sbtPublishCommand = "coreJVM/publishLocal; coreJS/publishLocal", -<<<<<<< HEAD scalacOptions = SbtCommunityProject.scalacOptions.filter(_ != "-Ysafe-init"), - dependencies = () => List(cats, catsEffect3, munitCatsEffect, scalacheckEffect, scodecBits) -======= dependencies = List(cats, catsEffect3, munitCatsEffect, scalacheckEffect, scodecBits) ->>>>>>> parent of e39b618f9a (-Yscala-release support: extend community build with basic forward-compat tests (compiling selected projects with "-Yscala-release 3.0")) ) lazy val libretto = SbtCommunityProject( @@ -806,12 +749,8 @@ object projects: project = "spire", sbtTestCommand = "test", sbtPublishCommand = "publishLocal", -<<<<<<< HEAD scalacOptions = SbtCommunityProject.scalacOptions.filter(_ != "-Xcheck-macros"), - dependencies = () => List(cats, disciplineMunit) -======= dependencies = List(cats, disciplineMunit) ->>>>>>> parent of e39b618f9a (-Yscala-release support: extend community build with basic forward-compat tests (compiling selected projects with "-Yscala-release 3.0")) ) lazy val http4s = SbtCommunityProject( @@ -819,7 +758,7 @@ object projects: sbtTestCommand = "tests/test; server/test; client/test; ember-core/test; ember-server/test; ember-client/test; circe/test", sbtPublishCommand = "publishLocal", scalacOptions = SbtCommunityProject.scalacOptions.filter(_ != "-Ysafe-init"), - dependencies = () => List(cats, catsEffect3, fs2, disciplineMunit, scalacheckEffect) + dependencies = List(cats, catsEffect3, fs2, disciplineMunit, scalacheckEffect) ) end projects @@ -900,13 +839,9 @@ def allProjects = List( projects.libretto, projects.jacksonModuleScala, projects.specs2, -<<<<<<< HEAD projects.coop, - projects.coopForwardCompat, projects.spire, projects.http4s -======= ->>>>>>> parent of e39b618f9a (-Yscala-release support: extend community build with basic forward-compat tests (compiling selected projects with "-Yscala-release 3.0")) ) lazy val projectMap = allProjects.groupBy(_.project) diff --git a/sbt-community-build/src/dotty/communitybuild/sbtplugin/CommunityBuildPlugin.scala b/sbt-community-build/src/dotty/communitybuild/sbtplugin/CommunityBuildPlugin.scala index fd9a6f48b9a8..0b580e1cb77a 100644 --- a/sbt-community-build/src/dotty/communitybuild/sbtplugin/CommunityBuildPlugin.scala +++ b/sbt-community-build/src/dotty/communitybuild/sbtplugin/CommunityBuildPlugin.scala @@ -28,20 +28,9 @@ object CommunityBuildPlugin extends AutoPlugin { override val buildSettings: Seq[Setting[_]] = Seq( dependencyOverrides ++= { -<<<<<<< HEAD - if (scalaVersion.value.startsWith("3.")) { - val forwardCompatFilter: ModuleID => Boolean = if (isForwardCompatProject.value) (_.revision.contains("-forward-compat")) else (!_.revision.contains("-forward-compat")) - val stdlibOverrides = Seq( - scalaOrganization.value %% "scala3-library" % scalaVersion.value, - scalaOrganization.value %% "scala3-library_sjs1" % scalaVersion.value - ) - CommunityBuildDependencies.allOverrides(sLog.value).filter(forwardCompatFilter) ++ stdlibOverrides - } else Nil -======= if (scalaVersion.value.startsWith("3.")) CommunityBuildDependencies.allOverrides(sLog.value) else Nil ->>>>>>> parent of e39b618f9a (-Yscala-release support: extend community build with basic forward-compat tests (compiling selected projects with "-Yscala-release 3.0")) } ) } From 272621bfc023d3a81ddd6321c6ce7696e5ddb051 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Marks?= Date: Thu, 21 Apr 2022 13:56:50 +0200 Subject: [PATCH 4/4] Remove submodules. This time for good --- community-build/community-projects/cats-effect-3-forward-compat | 1 - community-build/community-projects/cats-forward-compat | 1 - community-build/community-projects/cats-mtl-forward-compat | 1 - community-build/community-projects/coop-forward-compat | 1 - community-build/community-projects/discipline-forward-compat | 1 - .../community-projects/discipline-munit-forward-compat | 1 - .../community-projects/discipline-specs2-forward-compat | 1 - community-build/community-projects/munit-forward-compat | 1 - community-build/community-projects/scalacheck-forward-compat | 1 - .../community-projects/simulacrum-scalafix-forward-compat | 1 - 10 files changed, 10 deletions(-) delete mode 160000 community-build/community-projects/cats-effect-3-forward-compat delete mode 160000 community-build/community-projects/cats-forward-compat delete mode 160000 community-build/community-projects/cats-mtl-forward-compat delete mode 160000 community-build/community-projects/coop-forward-compat delete mode 160000 community-build/community-projects/discipline-forward-compat delete mode 160000 community-build/community-projects/discipline-munit-forward-compat delete mode 160000 community-build/community-projects/discipline-specs2-forward-compat delete mode 160000 community-build/community-projects/munit-forward-compat delete mode 160000 community-build/community-projects/scalacheck-forward-compat delete mode 160000 community-build/community-projects/simulacrum-scalafix-forward-compat diff --git a/community-build/community-projects/cats-effect-3-forward-compat b/community-build/community-projects/cats-effect-3-forward-compat deleted file mode 160000 index 2510979ee03d..000000000000 --- a/community-build/community-projects/cats-effect-3-forward-compat +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 2510979ee03d10e60011812698567885547d85d7 diff --git a/community-build/community-projects/cats-forward-compat b/community-build/community-projects/cats-forward-compat deleted file mode 160000 index 6bbbc1e3477b..000000000000 --- a/community-build/community-projects/cats-forward-compat +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 6bbbc1e3477b7da6b58a97844f773c3c445b4e5e diff --git a/community-build/community-projects/cats-mtl-forward-compat b/community-build/community-projects/cats-mtl-forward-compat deleted file mode 160000 index 149f002c8774..000000000000 --- a/community-build/community-projects/cats-mtl-forward-compat +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 149f002c8774b61df87cb846455d94ae858b3b54 diff --git a/community-build/community-projects/coop-forward-compat b/community-build/community-projects/coop-forward-compat deleted file mode 160000 index 8700dde73ef1..000000000000 --- a/community-build/community-projects/coop-forward-compat +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 8700dde73ef16a6135014840c4e33361dbd015d7 diff --git a/community-build/community-projects/discipline-forward-compat b/community-build/community-projects/discipline-forward-compat deleted file mode 160000 index afd001326789..000000000000 --- a/community-build/community-projects/discipline-forward-compat +++ /dev/null @@ -1 +0,0 @@ -Subproject commit afd00132678985341db210b56f3b2ead1a8405c2 diff --git a/community-build/community-projects/discipline-munit-forward-compat b/community-build/community-projects/discipline-munit-forward-compat deleted file mode 160000 index 38ea89226b8d..000000000000 --- a/community-build/community-projects/discipline-munit-forward-compat +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 38ea89226b8ddedc891b160f75d57ae5177f19a1 diff --git a/community-build/community-projects/discipline-specs2-forward-compat b/community-build/community-projects/discipline-specs2-forward-compat deleted file mode 160000 index e689c3e809a8..000000000000 --- a/community-build/community-projects/discipline-specs2-forward-compat +++ /dev/null @@ -1 +0,0 @@ -Subproject commit e689c3e809a89a03cdbbb3a1771e33148715f6c7 diff --git a/community-build/community-projects/munit-forward-compat b/community-build/community-projects/munit-forward-compat deleted file mode 160000 index 92f3ad9e8261..000000000000 --- a/community-build/community-projects/munit-forward-compat +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 92f3ad9e8261b4c142a551baaf61ef5fed84d36a diff --git a/community-build/community-projects/scalacheck-forward-compat b/community-build/community-projects/scalacheck-forward-compat deleted file mode 160000 index 976db31cd549..000000000000 --- a/community-build/community-projects/scalacheck-forward-compat +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 976db31cd549328167a90ecc6f5f31efa83cd845 diff --git a/community-build/community-projects/simulacrum-scalafix-forward-compat b/community-build/community-projects/simulacrum-scalafix-forward-compat deleted file mode 160000 index 2515271c46ad..000000000000 --- a/community-build/community-projects/simulacrum-scalafix-forward-compat +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 2515271c46ad46512a43d20e1e8ae0793433cf0b