Skip to content

Commit

Permalink
Revert bootstrap specificic settings after upgrade of reference version
Browse files Browse the repository at this point in the history
  • Loading branch information
WojciechMazur committed Jul 11, 2024
1 parent 9a17f4b commit 8f71e8f
Showing 1 changed file with 3 additions and 11 deletions.
14 changes: 3 additions & 11 deletions project/Build.scala
Original file line number Diff line number Diff line change
Expand Up @@ -617,7 +617,7 @@ object Build {
// Settings shared between scala3-compiler and scala3-compiler-bootstrapped
lazy val commonDottyCompilerSettings = Seq(
// Note: bench/profiles/projects.yml should be updated accordingly.
Compile / scalacOptions ++= Seq("-Yexplicit-nulls"),
Compile / scalacOptions ++= Seq("-Yexplicit-nulls", "-Wsafe-init"),

// Use source 3.3 to avoid fatal migration warnings on scalajs-ir
scalacOptions ++= Seq("-source", "3.3"),
Expand Down Expand Up @@ -894,8 +894,6 @@ object Build {
}

lazy val nonBootstrappedDottyCompilerSettings = commonDottyCompilerSettings ++ Seq(
// FIXME revert this to commonDottyCompilerSettings, when we bump reference version to 3.5.0
scalacOptions += "-Ysafe-init",
// packageAll packages all and then returns a map with the abs location
packageAll := Def.taskDyn { // Use a dynamic task to avoid loops when loading the settings
Def.task {
Expand Down Expand Up @@ -923,8 +921,6 @@ object Build {
)

lazy val bootstrappedDottyCompilerSettings = commonDottyCompilerSettings ++ Seq(
// FIXME revert this to commonDottyCompilerSettings, when we bump reference version to 3.5.0
scalacOptions += "-Wsafe-init",
javaOptions ++= {
val jars = packageAll.value
Seq(
Expand Down Expand Up @@ -1356,7 +1352,7 @@ object Build {
BuildInfoPlugin.buildInfoScopedSettings(Test) ++
BuildInfoPlugin.buildInfoDefaultSettings

def presentationCompilerSettings(implicit mode: Mode) = {
lazy val presentationCompilerSettings = {
val mtagsVersion = "1.3.2"
Seq(
libraryDependencies ++= Seq(
Expand All @@ -1371,11 +1367,7 @@ object Build {
ivyConfigurations += SourceDeps.hide,
transitiveClassifiers := Seq("sources"),
scalacOptions ++= Seq("-source", "3.3"), // To avoid fatal migration warnings
// FIXME change this to just Seq("-Yexplicit-nulls, "-Wsafe-init") when reference is set to 3.5.0
Compile / scalacOptions ++= (mode match {
case Bootstrapped => Seq("-Yexplicit-nulls", "-Wsafe-init")
case NonBootstrapped => Seq("-Yexplicit-nulls", "-Ysafe-init")
}),
Compile / scalacOptions ++= Seq("-Yexplicit-nulls", "-Wsafe-init"),
Compile / sourceGenerators += Def.task {
val s = streams.value
val cacheDir = s.cacheDirectory
Expand Down

0 comments on commit 8f71e8f

Please sign in to comment.