Skip to content

Commit 801c4d6

Browse files
hamzaremmalWojciechMazur
authored andcommitted
remove old scala3-compiler
[Cherry-picked 481842c]
1 parent eeccf36 commit 801c4d6

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
@@ -632,7 +632,7 @@ object Build {
632632
Compile / doc / scalacOptions ++= scalacOptionsDocSettings(),
633633
// force recompilation of bootstrapped modules when the compiler changes
634634
Compile / extraDevelocityCacheInputFiles ++=
635-
(`scala3-compiler` / Compile / fullClasspathAsJars).value.map(_.data.toPath)
635+
(`scala3-compiler-nonbootstrapped` / Compile / fullClasspathAsJars).value.map(_.data.toPath)
636636
)
637637

638638
/*lazy val commonBenchmarkSettings = Seq(
@@ -1021,39 +1021,18 @@ object Build {
10211021
(Test / javaOptions) += "-Xss2m"
10221022
)
10231023

1024-
lazy val bootstrappedDottyCompilerSettings = commonDottyCompilerSettings ++ Seq(
1025-
javaOptions ++= {
1026-
val jars = packageAll.value
1027-
Seq(
1028-
"-Ddotty.tests.classes.dottyStaging=" + jars("scala3-staging"),
1029-
"-Ddotty.tests.classes.dottyTastyInspector=" + jars("scala3-tasty-inspector"),
1030-
)
1031-
},
1032-
// For compatibility at this moment, both the bootstrapped and the non-bootstrapped
1033-
// compilers are compiled without flexible types.
1034-
// We should move the flag to commonDottyCompilerSettings once the reference
1035-
// compiler is updated.
1036-
// Then, the next step is to enable flexible types by default and reduce the use of
1037-
// `unsafeNulls`.
1038-
packageAll := {
1039-
(`scala3-compiler` / packageAll).value ++ Seq(
1040-
"scala3-compiler" -> (Compile / packageBin).value.getAbsolutePath,
1041-
)
1042-
},
1043-
1024+
lazy val bootstrappedDottyCompilerSettings = commonDottyCompilerSettings ++ Seq(
10441025
repl := (Compile / console).value,
10451026
Compile / console / scalacOptions := Nil, // reset so that we get stock REPL behaviour! E.g. avoid -unchecked being enabled
10461027
)
10471028

10481029
def dottyCompilerSettings(implicit mode: Mode): sbt.Def.SettingsDefinition =
10491030
if (mode == NonBootstrapped) nonBootstrappedDottyCompilerSettings else bootstrappedDottyCompilerSettings
10501031

1051-
lazy val `scala3-compiler` = project.in(file("compiler")).asDottyCompiler(NonBootstrapped)
1052-
10531032
lazy val Scala3CompilerCoursierTest = config("scala3CompilerCoursierTest") extend Test
10541033

10551034
def dottyCompiler(implicit mode: Mode): Project = mode match {
1056-
case NonBootstrapped => `scala3-compiler`
1035+
case NonBootstrapped => `scala3-compiler-nonbootstrapped`
10571036
case Bootstrapped => `scala3-compiler-bootstrapped-new`
10581037
}
10591038

@@ -2804,7 +2783,7 @@ object Build {
28042783
javaOptions := (`scala3-compiler-bootstrapped-new` / javaOptions).value,
28052784
).
28062785
settings(
2807-
ideTestsCompilerVersion := (`scala3-compiler` / version).value,
2786+
ideTestsCompilerVersion := (`scala3-compiler-nonbootstrapped` / version).value,
28082787
ideTestsCompilerArguments := Seq(),
28092788
ideTestsDependencyClasspath := {
28102789
val scalaLib = (`scala-library-bootstrapped` / Compile / classDirectory).value
@@ -3700,12 +3679,6 @@ object Build {
37003679

37013680
implicit class ProjectDefinitions(val project: Project) extends AnyVal {
37023681

3703-
def asDottyCompiler(implicit mode: Mode): Project = project.withCommonSettings.
3704-
dependsOn(`scala3-interfaces`).
3705-
dependsOn(dottyLibrary).
3706-
dependsOn(tastyCore).
3707-
settings(dottyCompilerSettings)
3708-
37093682
def asDottyLibrary(implicit mode: Mode): Project = {
37103683
val base = project
37113684
.withCommonSettings

0 commit comments

Comments
 (0)