diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 3c154b68491d..aae6ec8b9b0b 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -134,7 +134,7 @@ jobs: - name: Cmd Tests run: | - ./project/scripts/sbt ";dist/pack; scala3-bootstrapped/compile; scala3-bootstrapped/test ;sbt-test/scripted scala2-compat/* ;stdlib-bootstrapped-tasty-tests/run ;stdlib-bootstrapped-tasty-tests/test; scala3-compiler-bootstrapped/scala3CompilerCoursierTest:test" + ./project/scripts/sbt ";dist/pack; scala3-bootstrapped/compile; scala3-bootstrapped/test ;sbt-test/scripted scala2-compat/* ;scala2-library-tasty-tests/run ;scala2-library-tasty-tests/test; scala3-compiler-bootstrapped/scala3CompilerCoursierTest:test" ./project/scripts/cmdTests ./project/scripts/bootstrappedOnlyCmdTests @@ -253,12 +253,12 @@ jobs: - name: MiMa run: | - ./project/scripts/sbt ";scala3-interfaces/mimaReportBinaryIssues ;scala3-library-bootstrapped/mimaReportBinaryIssues ;scala3-library-bootstrappedJS/mimaReportBinaryIssues; tasty-core-bootstrapped/mimaReportBinaryIssues; stdlib-bootstrapped/mimaReportBinaryIssues" + ./project/scripts/sbt ";scala3-interfaces/mimaReportBinaryIssues ;scala3-library-bootstrapped/mimaReportBinaryIssues ;scala3-library-bootstrappedJS/mimaReportBinaryIssues; tasty-core-bootstrapped/mimaReportBinaryIssues; scala2-library-bootstrapped/mimaReportBinaryIssues" - name: TASTy MiMa run: | # This script cleans the compiler and recompiles it from scratch (keep as last run) - ./project/scripts/stdlib-bootstrapped-tasty-mima.sh + ./project/scripts/scala2-library-tasty-mima.sh community_build_a: runs-on: [self-hosted, Linux] @@ -493,7 +493,7 @@ jobs: - name: Test run: | - ./project/scripts/sbt ";dist/pack ;scala3-bootstrapped/compile ;scala3-bootstrapped/test ;sbt-test/scripted scala2-compat/* ;stdlib-bootstrapped-tasty-tests/run ;stdlib-bootstrapped-tasty-tests/test" + ./project/scripts/sbt ";dist/pack ;scala3-bootstrapped/compile ;scala3-bootstrapped/test ;sbt-test/scripted scala2-compat/* ;scala2-library-tasty-tests/run ;scala2-library-tasty-tests/test" ./project/scripts/cmdTests ./project/scripts/bootstrappedOnlyCmdTests diff --git a/build.sbt b/build.sbt index 878f61787dea..9b6ebc194ea0 100644 --- a/build.sbt +++ b/build.sbt @@ -14,9 +14,9 @@ val `scala3-language-server` = Build.`scala3-language-server` val `scala3-bench` = Build.`scala3-bench` val `scala3-bench-bootstrapped` = Build.`scala3-bench-bootstrapped` val `scala3-bench-micro` = Build.`scala3-bench-micro` -val `stdlib-bootstrapped` = Build.`stdlib-bootstrapped` -val `stdlib-bootstrapped-tasty` = Build.`stdlib-bootstrapped-tasty` -val `stdlib-bootstrapped-tasty-tests` = Build.`stdlib-bootstrapped-tasty-tests` +val `scala2-library-bootstrapped` = Build.`scala2-library-bootstrapped` +val `scala2-library-tasty` = Build.`scala2-library-tasty` +val `scala2-library-tasty-tests` = Build.`scala2-library-tasty-tests` val `tasty-core` = Build.`tasty-core` val `tasty-core-bootstrapped` = Build.`tasty-core-bootstrapped` val `tasty-core-scala2` = Build.`tasty-core-scala2` diff --git a/compiler/src/dotty/tools/dotc/sbt/ExtractDependencies.scala b/compiler/src/dotty/tools/dotc/sbt/ExtractDependencies.scala index bd3ab4e3ae0f..d0330a955148 100644 --- a/compiler/src/dotty/tools/dotc/sbt/ExtractDependencies.scala +++ b/compiler/src/dotty/tools/dotc/sbt/ExtractDependencies.scala @@ -476,7 +476,7 @@ class DependencyRecorder { * we should have called `cb.generatedNonLocalClass` with the same class file name. * * FIXME: we still need a way to resolve the correct classfile when we split tasty and classes between - * different outputs (e.g. stdlib-bootstrapped). + * different outputs (e.g. scala2-library-bootstrapped). */ def cachedSiblingClass(pf: PlainFile): Path = siblingClassfiles.getOrElseUpdate(pf, { diff --git a/project/Build.scala b/project/Build.scala index 3ca5ddc9f248..2b74128b3288 100644 --- a/project/Build.scala +++ b/project/Build.scala @@ -271,7 +271,7 @@ object Build { Keys.scalaSource, Keys.javaSource ), - // This is used to download nightly builds of the Scala 2 library in `stdlib-bootstrapped` + // This is used to download nightly builds of the Scala 2 library in `scala2-library-bootstrapped` resolvers += "scala-integration" at "https://scala-ci.typesafe.com/artifactory/scala-integration/", ) @@ -723,7 +723,7 @@ object Build { val externalDeps = externalCompilerClasspathTask.value val jars = packageAll.value val scalaLib = findArtifactPath(externalDeps, "scala-library") - val scalaLibTastyOpt = jars.get("stdlib-bootstrapped-tasty") + val scalaLibTastyOpt = jars.get("scala2-library-tasty") val dottyLib = jars("scala3-library") val dottyCompiler = jars("scala3-compiler") val args0: List[String] = spaceDelimited("").parsed.toList @@ -857,7 +857,7 @@ object Build { "scala3-staging" -> (LocalProject("scala3-staging") / Compile / packageBin).value.getAbsolutePath, "scala3-tasty-inspector" -> (LocalProject("scala3-tasty-inspector") / Compile / packageBin).value.getAbsolutePath, "tasty-core" -> (LocalProject("tasty-core-bootstrapped") / Compile / packageBin).value.getAbsolutePath, - "stdlib-bootstrapped-tasty" -> (LocalProject("stdlib-bootstrapped-tasty") / Compile / packageBin).value.getAbsolutePath, + "scala2-library-tasty" -> (LocalProject("scala2-library-tasty") / Compile / packageBin).value.getAbsolutePath, ) }, @@ -982,7 +982,7 @@ object Build { * * This version of the library is not (yet) TASTy/binary compatible with the Scala 2 compiled library. */ - lazy val `stdlib-bootstrapped` = project.in(file("stdlib-bootstrapped")). + lazy val `scala2-library-bootstrapped` = project.in(file("scala2-library-bootstrapped")). withCommonSettings(Bootstrapped). dependsOn(dottyCompiler(Bootstrapped) % "provided; compile->runtime; test->test"). settings(commonBootstrappedSettings). @@ -1071,7 +1071,7 @@ object Build { | - final val MinorVersion = $minorVersion | - final val ExperimentalVersion = 0 | * Clean everiting to generate a compiler with those new TASTy vesrions - | * Run stdlib-bootstrapped/tastyMiMaReportIssues + | * Run scala2-library-bootstrapped/tastyMiMaReportIssues |""".stripMargin) }).value, @@ -1115,56 +1115,56 @@ object Build { println( s"""Usage: |> $projectName/run list - | -- lists all files that are not overriden in stdlib-bootstrapped/src + | -- lists all files that are not overriden in scala2-library-bootstrapped/src | |> $projectName/run clone * - | -- clones the specified sources from the stdlib-bootstrapped/src + | -- clones the specified sources from the scala2-library-bootstrapped/src | -- example: $projectName/run clone scala/Option.scala | |> $projectName/run overwrite * - | -- (danger) overwrites the specified sources from the stdlib-bootstrapped/src + | -- (danger) overwrites the specified sources from the scala2-library-bootstrapped/src |""".stripMargin) } } ) - /** Packages the TASTy files of `stdlib-bootstrapped` in a jar */ - lazy val `stdlib-bootstrapped-tasty` = project.in(file("stdlib-bootstrapped-tasty")). + /** Packages the TASTy files of `scala2-library-bootstrapped` in a jar */ + lazy val `scala2-library-tasty` = project.in(file("scala2-library-tasty")). withCommonSettings(Bootstrapped). settings( exportJars := true, Compile / packageBin / mappings := { - (`stdlib-bootstrapped` / Compile / packageBin / mappings).value + (`scala2-library-bootstrapped` / Compile / packageBin / mappings).value .filter(_._2.endsWith(".tasty")) }, ) - /** Test the tasty generated by `stdlib-bootstrapped` + /** Test the tasty generated by `scala2-library-bootstrapped` * - * The sources in src are compiled using TASTy from stdlib-bootstrapped-tasty but then run + * The sources in src are compiled using TASTy from scala2-library-tasty but then run * with the scala-library compiled be Scala 2. * * The tests are run with the bootstrapped compiler and the tasty inpector on the classpath. - * The classpath has the default `scala-library` and not `stdlib-bootstrapped`. + * The classpath has the default `scala-library` and not `scala2-library-bootstrapped`. * - * The jar of `stdlib-bootstrapped` is provided for to the tests. + * The jar of `scala2-library-bootstrapped` is provided for to the tests. * - inspector: test that we can load the contents of the jar using the tasty inspector * - from-tasty: test that we can recompile the contents of the jar using `dotc -from-tasty` */ - lazy val `stdlib-bootstrapped-tasty-tests` = project.in(file("stdlib-bootstrapped-tasty-tests")). + lazy val `scala2-library-tasty-tests` = project.in(file("scala2-library-tasty-tests")). withCommonSettings(Bootstrapped). dependsOn(dottyCompiler(Bootstrapped) % "compile->compile"). dependsOn(`scala3-tasty-inspector` % "test->test"). - dependsOn(`stdlib-bootstrapped-tasty`). + dependsOn(`scala2-library-tasty`). settings(commonBootstrappedSettings). settings( javaOptions := (`scala3-compiler-bootstrapped` / javaOptions).value, - Test / javaOptions += "-Ddotty.scala.library=" + (`stdlib-bootstrapped` / Compile / packageBin).value.getAbsolutePath, + Test / javaOptions += "-Ddotty.scala.library=" + (`scala2-library-bootstrapped` / Compile / packageBin).value.getAbsolutePath, Compile / compile / fullClasspath ~= { _.filterNot(file => file.data.getName == s"scala-library-$stdlibBootstrappedVersion.jar") }, Compile / compile / dependencyClasspath := { - // make sure that the scala2-library (tasty of `stdlib-bootstrapped-tasty`) is listed before the scala-library (classfiles) + // make sure that the scala2-library (tasty of `scala2-library-tasty`) is listed before the scala-library (classfiles) val (bootstrappedLib, otherLibs) = (Compile / compile / dependencyClasspath).value .partition(_.data.getName == s"scala2-library-${dottyVersion}.jar") @@ -2116,7 +2116,7 @@ object ScaladocConfigs { def defaultSourceLinks(version: String = dottyNonBootstrappedVersion, refVersion: String = dottyVersion) = Def.task { def stdLibVersion = stdlibVersion(NonBootstrapped) - def srcManaged(v: String, s: String) = s"out/bootstrap/stdlib-bootstrapped/scala-$v/src_managed/main/$s-library-src" + def srcManaged(v: String, s: String) = s"out/bootstrap/scala2-library-bootstrapped/scala-$v/src_managed/main/$s-library-src" SourceLinks( List( scalaSrcLink(stdLibVersion, srcManaged(version, "scala") + "="), @@ -2204,7 +2204,7 @@ object ScaladocConfigs { lazy val Scala3 = Def.task { val dottyJars: Seq[java.io.File] = Seq( - (`stdlib-bootstrapped`/Compile/products).value, + (`scala2-library-bootstrapped`/Compile/products).value, (`scala3-library-bootstrapped`/Compile/products).value, (`scala3-interfaces`/Compile/products).value, (`tasty-core-bootstrapped`/Compile/products).value, @@ -2213,7 +2213,7 @@ object ScaladocConfigs { val roots = dottyJars.map(_.getAbsolutePath) val managedSources = - (`stdlib-bootstrapped`/Compile/sourceManaged).value / "scala-library-src" + (`scala2-library-bootstrapped`/Compile/sourceManaged).value / "scala-library-src" val projectRoot = (ThisBuild/baseDirectory).value.toPath val stdLibRoot = projectRoot.relativize(managedSources.toPath.normalize()) val docRootFile = stdLibRoot.resolve("rootdoc.txt") @@ -2246,7 +2246,7 @@ object ScaladocConfigs { } def stableScala3(version: String) = Def.task { - val scalaLibrarySrc = s"out/bootstrap/stdlib-bootstrapped/scala-$version-bin-SNAPSHOT-nonbootstrapped/src_managed" + val scalaLibrarySrc = s"out/bootstrap/scala2-library-bootstrapped/scala-$version-bin-SNAPSHOT-nonbootstrapped/src_managed" val dottyLibrarySrc = "library/src" Scala3.value .add(defaultSourceLinks(version + "-bin-SNAPSHOT-nonbootstrapped", version).value) @@ -2265,7 +2265,7 @@ object ScaladocConfigs { .add(DocRootContent(s"$scalaLibrarySrc/rootdoc.txt")) .withTargets( Seq( - s"out/bootstrap/stdlib-bootstrapped/scala-$version-bin-SNAPSHOT-nonbootstrapped/classes", + s"out/bootstrap/scala2-library-bootstrapped/scala-$version-bin-SNAPSHOT-nonbootstrapped/classes", s"out/bootstrap/scala3-library-bootstrapped/scala-$version-bin-SNAPSHOT-nonbootstrapped/classes", s"tmp/interfaces/target/classes", s"out/bootstrap/tasty-core-bootstrapped/scala-$version-bin-SNAPSHOT-nonbootstrapped/classes" diff --git a/project/TastyMiMaFilters.scala b/project/TastyMiMaFilters.scala index 7468b1891f5c..5aceb44a3837 100644 --- a/project/TastyMiMaFilters.scala +++ b/project/TastyMiMaFilters.scala @@ -11,12 +11,12 @@ object TastyMiMaFilters { // Probably OK: ConstantType for `null` versus `scala.Null` // Calls to the default getter seem to link correctly. - // Tested in stdlib-bootstrapped/test/scala/collection/UnrolledBufferTest.scala + // Tested in scala2-library-bootstrapped/test/scala/collection/UnrolledBufferTest.scala ProblemMatcher.make(ProblemKind.IncompatibleTypeChange, "scala.collection.mutable.UnrolledBuffer.Unrolled.$default$4"), // Probably OK: Overriding java method (`public abstract Object underlying();` with `def underlying: Object`) // Calls to the underlying seem to link correctly. - // Tested in stdlib-bootstrapped/test/Main.scala + // Tested in scala2-library-bootstrapped/test/Main.scala ProblemMatcher.make(ProblemKind.MissingTermMember, "scala.math.Big*.underlying"), ProblemMatcher.make(ProblemKind.NewAbstractMember, "scala.math.ScalaNumericConversions.underlying"), diff --git a/project/scripts/cmdScaladocTests b/project/scripts/cmdScaladocTests index 2168e3e8e334..26e39e13796f 100755 --- a/project/scripts/cmdScaladocTests +++ b/project/scripts/cmdScaladocTests @@ -23,8 +23,8 @@ SOURCE_LINKS_VERSION="${GITHUB_SHA:-$DOTTY_BOOTSTRAPPED_VERSION}" dist/target/pack/bin/scaladoc \ -d "$OUT1" \ -project "scaladoc testcases" \ - -source-links:out/bootstrap/stdlib-bootstrapped/scala-"${DOTTY_NONBOOTSTRAPPED_VERSION}"/src_managed/main/scala-library-src=github://scala/scala/v"${STDLIB_VERSION}"#src/library \ - -source-links:out/bootstrap/stdlib-bootstrapped/scala-"${DOTTY_NONBOOTSTRAPPED_VERSION}"/src_managed/main/dotty-library-src=github://"${SOURCE_LINKS_REPOSITORY}"/"${SOURCE_LINKS_VERSION}"\#library/src \ + -source-links:out/bootstrap/scala2-library-bootstrapped/scala-"${DOTTY_NONBOOTSTRAPPED_VERSION}"/src_managed/main/scala-library-src=github://scala/scala/v"${STDLIB_VERSION}"#src/library \ + -source-links:out/bootstrap/scala2-library-bootstrapped/scala-"${DOTTY_NONBOOTSTRAPPED_VERSION}"/src_managed/main/dotty-library-src=github://"${SOURCE_LINKS_REPOSITORY}"/"${SOURCE_LINKS_VERSION}"\#library/src \ -source-links:github://"${SOURCE_LINKS_REPOSITORY}"/"${SOURCE_LINKS_VERSION}" \ "-external-mappings:.*scala/.*::scaladoc3::https://dotty.epfl.ch/api/,.*java/.*::javadoc::https://docs.oracle.com/javase/8/docs/api/" \ "-skip-by-regex:.+\.internal($|\..+)" \ diff --git a/project/scripts/stdlib-bootstrapped-tasty-mima.sh b/project/scripts/scala2-library-tasty-mima.sh similarity index 79% rename from project/scripts/stdlib-bootstrapped-tasty-mima.sh rename to project/scripts/scala2-library-tasty-mima.sh index 8fcd4723a125..db2b75bd07e9 100755 --- a/project/scripts/stdlib-bootstrapped-tasty-mima.sh +++ b/project/scripts/scala2-library-tasty-mima.sh @@ -14,9 +14,9 @@ setTastyVersion() { setTastyVersion $MINOR_TASTY_VERSION_SUPPORTED_BY_TASTY_MIMA 0 -# Run stdlib-bootstrapped/tastyMiMaReportIssues using a custom TASTy version. +# Run scala2-library-bootstrapped/tastyMiMaReportIssues using a custom TASTy version. # We clean before to make sure all sources are recompiled using the new TASTY version. # We clean after to make sure no other test will use the TASTy generated with this version. -"$SBT" "clean; stdlib-bootstrapped/clean; reload; stdlib-bootstrapped/tastyMiMaReportIssues; clean; stdlib-bootstrapped/clean" +"$SBT" "clean; scala2-library-bootstrapped/clean; reload; scala2-library-bootstrapped/tastyMiMaReportIssues; clean; scala2-library-bootstrapped/clean" setTastyVersion $MINOR_TASTY_VERSION $EXPERIMENTAL_TASTY_VERSION diff --git a/stdlib-bootstrapped-tasty-tests/src/Main.scala b/scala2-library-tasty-tests/src/Main.scala similarity index 100% rename from stdlib-bootstrapped-tasty-tests/src/Main.scala rename to scala2-library-tasty-tests/src/Main.scala diff --git a/stdlib-bootstrapped-tasty-tests/src/UnrolledBufferTest.scala b/scala2-library-tasty-tests/src/UnrolledBufferTest.scala similarity index 100% rename from stdlib-bootstrapped-tasty-tests/src/UnrolledBufferTest.scala rename to scala2-library-tasty-tests/src/UnrolledBufferTest.scala diff --git a/stdlib-bootstrapped-tasty-tests/test/BootstrappedStdLibTASYyTest.scala b/scala2-library-tasty-tests/test/BootstrappedStdLibTASYyTest.scala similarity index 100% rename from stdlib-bootstrapped-tasty-tests/test/BootstrappedStdLibTASYyTest.scala rename to scala2-library-tasty-tests/test/BootstrappedStdLibTASYyTest.scala