From 995cb421d75c342301d37f4ec63958568e56c23a Mon Sep 17 00:00:00 2001 From: Hamza Remmal Date: Sat, 5 Oct 2024 14:09:57 +0200 Subject: [PATCH] Drop scala3-presentation-compiler-non-bootstrapped --- .github/workflows/ci.yaml | 2 +- build.sbt | 1 - project/Build.scala | 27 +++++++++------------------ 3 files changed, 10 insertions(+), 20 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 79262b1ae7b7..95a6ed24df13 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -228,7 +228,7 @@ jobs: uses: actions/checkout@v4 - name: Test - run: sbt ";scala3-bootstrapped/compile; scala3-bootstrapped/testCompilation; scala3-presentation-compiler-bootstrapped/test; scala3-language-server/test" + run: sbt ";scala3-bootstrapped/compile; scala3-bootstrapped/testCompilation; scala3-presentation-compiler/test; scala3-language-server/test" shell: cmd - name: build binary diff --git a/build.sbt b/build.sbt index f357044c91ca..9d29bfcb6d6a 100644 --- a/build.sbt +++ b/build.sbt @@ -36,7 +36,6 @@ val `dist-linux-aarch64` = Build.`dist-linux-aarch64` val `community-build` = Build.`community-build` val `sbt-community-build` = Build.`sbt-community-build` val `scala3-presentation-compiler` = Build.`scala3-presentation-compiler` -val `scala3-presentation-compiler-bootstrapped` = Build.`scala3-presentation-compiler-bootstrapped` val sjsSandbox = Build.sjsSandbox val sjsJUnitTests = Build.sjsJUnitTests diff --git a/project/Build.scala b/project/Build.scala index 2a23f0202eb0..8993edc45ede 100644 --- a/project/Build.scala +++ b/project/Build.scala @@ -1374,25 +1374,21 @@ object Build { ) lazy val `scala3-presentation-compiler` = project.in(file("presentation-compiler")) - .asScala3PresentationCompiler(NonBootstrapped) - lazy val `scala3-presentation-compiler-bootstrapped` = project.in(file("presentation-compiler")) - .asScala3PresentationCompiler(Bootstrapped) + .withCommonSettings(Bootstrapped) + .dependsOn(`scala3-compiler-bootstrapped`, `scala3-library-bootstrapped`) + .settings(presentationCompilerSettings) + .settings(scala3PresentationCompilerBuildInfo) .settings( // Add `-Yno-flexible-types` flag for bootstrap, see comments for `bootstrappedDottyCompilerSettings` Compile / scalacOptions += "-Yno-flexible-types" ) - def scala3PresentationCompiler(implicit mode: Mode): Project = mode match { - case NonBootstrapped => `scala3-presentation-compiler` - case Bootstrapped => `scala3-presentation-compiler-bootstrapped` - } - - def scala3PresentationCompilerBuildInfo(implicit mode: Mode) = + def scala3PresentationCompilerBuildInfo = Seq( ideTestsDependencyClasspath := { - val dottyLib = (dottyLibrary / Compile / classDirectory).value + val dottyLib = (`scala3-library-bootstrapped` / Compile / classDirectory).value val scalaLib = - (dottyLibrary / Compile / dependencyClasspath) + (`scala3-library-bootstrapped` / Compile / dependencyClasspath) .value .map(_.data) .filter(_.getName.matches("scala-library.*\\.jar")) @@ -2284,9 +2280,9 @@ object Build { // FIXME: we do not aggregate `bin` because its tests delete jars, thus breaking other tests def asDottyRoot(implicit mode: Mode): Project = project.withCommonSettings. - aggregate(`scala3-interfaces`, dottyLibrary, dottyCompiler, tastyCore, `scala3-sbt-bridge`, scala3PresentationCompiler). + aggregate(`scala3-interfaces`, dottyLibrary, dottyCompiler, tastyCore, `scala3-sbt-bridge`). bootstrappedAggregate(`scala2-library-tasty`, `scala2-library-cc-tasty`, `scala3-language-server`, `scala3-staging`, - `scala3-tasty-inspector`, `scala3-library-bootstrappedJS`, scaladoc). + `scala3-tasty-inspector`, `scala3-library-bootstrappedJS`, scaladoc, `scala3-presentation-compiler`). dependsOn(tastyCore). dependsOn(dottyCompiler). dependsOn(dottyLibrary). @@ -2396,11 +2392,6 @@ object Build { settings(commonBenchmarkSettings). enablePlugins(JmhPlugin) - def asScala3PresentationCompiler(implicit mode: Mode): Project = project.withCommonSettings. - dependsOn(dottyCompiler, dottyLibrary). - settings(presentationCompilerSettings). - settings(scala3PresentationCompilerBuildInfo) - def asDist(implicit mode: Mode): Project = project. enablePlugins(UniversalPlugin, RepublishPlugin). withCommonSettings.