Skip to content

Commit 481842c

Browse files
committed
remove old scala3-compiler
1 parent 601b78f commit 481842c

File tree

2 files changed

+7
-32
lines changed

2 files changed

+7
-32
lines changed

build.sbt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,11 @@ val `scala3-nonbootstrapped` = Build.`scala3-nonbootstrapped`
33
val `scala3-bootstrapped-new` = Build.`scala3-bootstrapped-new`
44

55
val `scala3-interfaces` = Build.`scala3-interfaces`
6-
val `scala3-compiler` = Build.`scala3-compiler`
6+
7+
// Compiler projects
78
val `scala3-compiler-nonbootstrapped` = Build.`scala3-compiler-nonbootstrapped`
89
val `scala3-compiler-bootstrapped-new` = Build.`scala3-compiler-bootstrapped-new`
10+
911
val `scala3-repl` = Build.`scala3-repl`
1012
val `scala-library-sjs` = Build.`scala-library-sjs`
1113
val `scala3-library-sjs` = Build.`scala3-library-sjs`

project/Build.scala

Lines changed: 4 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -600,7 +600,7 @@ object Build {
600600
Compile / doc / scalacOptions ++= scalacOptionsDocSettings(),
601601
// force recompilation of bootstrapped modules when the compiler changes
602602
Compile / extraDevelocityCacheInputFiles ++=
603-
(`scala3-compiler` / Compile / fullClasspathAsJars).value.map(_.data.toPath)
603+
(`scala3-compiler-nonbootstrapped` / Compile / fullClasspathAsJars).value.map(_.data.toPath)
604604
)
605605

606606
/*lazy val commonBenchmarkSettings = Seq(
@@ -989,39 +989,18 @@ object Build {
989989
(Test / javaOptions) += "-Xss2m"
990990
)
991991

992-
lazy val bootstrappedDottyCompilerSettings = commonDottyCompilerSettings ++ Seq(
993-
javaOptions ++= {
994-
val jars = packageAll.value
995-
Seq(
996-
"-Ddotty.tests.classes.dottyStaging=" + jars("scala3-staging"),
997-
"-Ddotty.tests.classes.dottyTastyInspector=" + jars("scala3-tasty-inspector"),
998-
)
999-
},
1000-
// For compatibility at this moment, both the bootstrapped and the non-bootstrapped
1001-
// compilers are compiled without flexible types.
1002-
// We should move the flag to commonDottyCompilerSettings once the reference
1003-
// compiler is updated.
1004-
// Then, the next step is to enable flexible types by default and reduce the use of
1005-
// `unsafeNulls`.
1006-
packageAll := {
1007-
(`scala3-compiler` / packageAll).value ++ Seq(
1008-
"scala3-compiler" -> (Compile / packageBin).value.getAbsolutePath,
1009-
)
1010-
},
1011-
992+
lazy val bootstrappedDottyCompilerSettings = commonDottyCompilerSettings ++ Seq(
1012993
repl := (Compile / console).value,
1013994
Compile / console / scalacOptions := Nil, // reset so that we get stock REPL behaviour! E.g. avoid -unchecked being enabled
1014995
)
1015996

1016997
def dottyCompilerSettings(implicit mode: Mode): sbt.Def.SettingsDefinition =
1017998
if (mode == NonBootstrapped) nonBootstrappedDottyCompilerSettings else bootstrappedDottyCompilerSettings
1018999

1019-
lazy val `scala3-compiler` = project.in(file("compiler")).asDottyCompiler(NonBootstrapped)
1020-
10211000
lazy val Scala3CompilerCoursierTest = config("scala3CompilerCoursierTest") extend Test
10221001

10231002
def dottyCompiler(implicit mode: Mode): Project = mode match {
1024-
case NonBootstrapped => `scala3-compiler`
1003+
case NonBootstrapped => `scala3-compiler-nonbootstrapped`
10251004
case Bootstrapped => `scala3-compiler-bootstrapped-new`
10261005
}
10271006

@@ -2744,7 +2723,7 @@ object Build {
27442723
javaOptions := (`scala3-compiler-bootstrapped-new` / javaOptions).value,
27452724
).
27462725
settings(
2747-
ideTestsCompilerVersion := (`scala3-compiler` / version).value,
2726+
ideTestsCompilerVersion := (`scala3-compiler-nonbootstrapped` / version).value,
27482727
ideTestsCompilerArguments := Seq(),
27492728
ideTestsDependencyClasspath := {
27502729
val scalaLib = (`scala-library-bootstrapped` / Compile / classDirectory).value
@@ -3640,12 +3619,6 @@ object Build {
36403619

36413620
implicit class ProjectDefinitions(val project: Project) extends AnyVal {
36423621

3643-
def asDottyCompiler(implicit mode: Mode): Project = project.withCommonSettings.
3644-
dependsOn(`scala3-interfaces`).
3645-
dependsOn(dottyLibrary).
3646-
dependsOn(tastyCore).
3647-
settings(dottyCompilerSettings)
3648-
36493622
def asDottyLibrary(implicit mode: Mode): Project = {
36503623
val base = project
36513624
.withCommonSettings

0 commit comments

Comments
 (0)