Skip to content

Commit 719a9a1

Browse files
committed
Use the same compilation flags in non-bootstrapped and bootstrapped builds
This avoids finding compilation errors late in the development cycle. Having explicit nulls on is especially important because typed and untyped trees are now only distinguished using `Null`, so on the non-bootstrapped build we don't get compiler errors when passing an untyped Tree where a typed Tree is expected.
1 parent 0022e5b commit 719a9a1

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

project/Build.scala

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -524,6 +524,9 @@ object Build {
524524

525525
// Settings shared between scala3-compiler and scala3-compiler-bootstrapped
526526
lazy val commonDottyCompilerSettings = Seq(
527+
// Note: bench/profiles/projects.yml should be updated accordingly.
528+
Compile / scalacOptions ++= Seq("-Yexplicit-nulls", "-Ysafe-init"),
529+
527530
// Generate compiler.properties, used by sbt
528531
(Compile / resourceGenerators) += Def.task {
529532
import java.util._
@@ -802,9 +805,6 @@ object Build {
802805
)
803806
},
804807

805-
// Note: bench/profiles/projects.yml should be updated accordingly.
806-
Compile / scalacOptions ++= Seq("-Yexplicit-nulls", "-Ysafe-init"),
807-
808808
repl := (Compile / console).value,
809809
Compile / console / scalacOptions := Nil, // reset so that we get stock REPL behaviour! E.g. avoid -unchecked being enabled
810810
)

0 commit comments

Comments
 (0)