Skip to content

Commit e7976e0

Browse files
smarterzeptometer
authored andcommitted
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 40c7175 commit e7976e0

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
@@ -526,6 +526,9 @@ object Build {
526526

527527
// Settings shared between scala3-compiler and scala3-compiler-bootstrapped
528528
lazy val commonDottyCompilerSettings = Seq(
529+
// Note: bench/profiles/projects.yml should be updated accordingly.
530+
Compile / scalacOptions ++= Seq("-Yexplicit-nulls", "-Ysafe-init"),
531+
529532
// Generate compiler.properties, used by sbt
530533
(Compile / resourceGenerators) += Def.task {
531534
import java.util._
@@ -804,9 +807,6 @@ object Build {
804807
)
805808
},
806809

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

0 commit comments

Comments
 (0)