Skip to content

Commit

Permalink
Drop scala3-presentation-compiler-non-bootstrapped
Browse files Browse the repository at this point in the history
  • Loading branch information
hamzaremmal committed Oct 5, 2024
1 parent ebbd685 commit 995cb42
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 20 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 0 additions & 1 deletion build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
27 changes: 9 additions & 18 deletions project/Build.scala
Original file line number Diff line number Diff line change
Expand Up @@ -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"))
Expand Down Expand Up @@ -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).
Expand Down Expand Up @@ -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.
Expand Down

0 comments on commit 995cb42

Please sign in to comment.