@@ -189,7 +189,7 @@ object Build {
189189 " -encoding" , " UTF8" ,
190190 " -language:implicitConversions" ,
191191 s " --java-output-version: ${Versions .minimumJVMVersion}" ,
192- " -Yexplicit-nulls " ,
192+ " -language:safeNulls " ,
193193 " -Wsafe-init"
194194 ),
195195
@@ -1082,13 +1082,14 @@ object Build {
10821082 // Remove Scala 3 specific settings
10831083 scalacOptions --= Seq (
10841084 " --java-output-version:17" ,
1085- " -Yexplicit-nulls " ,
1086- " -Wsafe-init "
1085+ " -Wsafe-init " ,
1086+ " -language:safeNulls " ,
10871087 ),
10881088 scalacOptions ++= Seq (
10891089 " -release:17" ,
10901090 s " -sourcepath: ${(Compile / sourceDirectory).value}" ,
10911091 " -opt:local" , // Important: local optimization are fine, inlining is prohibited!
1092+ " -Yno-explicit-nulls" ,
10921093 ),
10931094 target := target.value / " scala2-library" ,
10941095 Compile / sourceDirectory := (Compile / Keys .target).value / " sources" / scalaVersion.value,
@@ -2117,7 +2118,8 @@ object Build {
21172118 // is a project dependency instead
21182119 excludeDependencies += " org.scala-lang" %% " scala3-library" ,
21192120 javaOptions := (`scala3-compiler-bootstrapped` / javaOptions).value,
2120- scalacOptions -= " -Yexplicit-nulls" ,
2121+ scalacOptions -= " -language:safeNulls" ,
2122+ scalacOptions += " -Yno-explicit-nulls" ,
21212123 ).
21222124 settings(
21232125 ideTestsCompilerVersion := (`scala3-compiler-nonbootstrapped` / version).value,
@@ -2186,7 +2188,8 @@ object Build {
21862188 settings(
21872189 regularScalaJSProjectSettings,
21882190 bspEnabled := false ,
2189- scalacOptions --= Seq (" -Werror" , " -deprecation" , " -Yexplicit-nulls" ),
2191+ scalacOptions --= Seq (" -Werror" , " -deprecation" , " -language:safeNulls" ),
2192+ scalacOptions += " -Yno-explicit-nulls" ,
21902193
21912194 // Required to run Scala.js tests.
21922195 Test / fork := false ,
@@ -2481,7 +2484,8 @@ object Build {
24812484 commonBootstrappedSettings,
24822485 scalaJSUseMainModuleInitializer := true ,
24832486 Test / fork := false ,
2484- scalacOptions -= " -Yexplicit-nulls" ,
2487+ scalacOptions -= " -language:safeNulls" ,
2488+ scalacOptions += " -Yno-explicit-nulls" ,
24852489 )
24862490
24872491 lazy val `scaladoc-js-contributors` = project.in(file(" scaladoc-js/contributors" )).
@@ -2564,7 +2568,8 @@ object Build {
25642568 Compile / run := (Compile / run).dependsOn(prepareCommunityBuild).evaluated,
25652569 Test / testOnly := ((Test / testOnly) dependsOn prepareCommunityBuild).evaluated,
25662570 Test / test := ((Test / test ) dependsOn prepareCommunityBuild).value,
2567- scalacOptions -= " -Yexplicit-nulls" ,
2571+ scalacOptions -= " -language:safeNulls" ,
2572+ scalacOptions += " -Yno-explicit-nulls" ,
25682573 javaOptions ++= {
25692574 // Propagate the ivy cache directory setting to the tests, which will
25702575 // then propagate it further to the sbt instances they will spawn.
0 commit comments