@@ -448,10 +448,14 @@ object Build {
448448 ) ++ extMap
449449 }
450450
451+ val enableBspAllProjects = sys.env.get(" ENABLE_BSP_ALL_PROJECTS" ).map(_.toBoolean).getOrElse{
452+ val enableBspAllProjectsFile = file(" .enable_bsp_all_projects" )
453+ enableBspAllProjectsFile.exists()
454+ }
455+
451456 // Settings used when compiling dotty with a non-bootstrapped dotty
452457 lazy val commonBootstrappedSettings = commonDottySettings ++ Seq (
453458 // To enable support of scaladoc and language-server projects you need to change this to true
454- bspEnabled := false ,
455459 (Compile / unmanagedSourceDirectories) += baseDirectory.value / " src-bootstrapped" ,
456460
457461 version := dottyVersion,
@@ -726,7 +730,6 @@ object Build {
726730 (`scala3-compiler-nonbootstrapped` / Test / testOnly).toTask(cmd)
727731 }
728732 }.evaluated,
729- bspEnabled := false ,
730733 )
731734
732735 /* Configuration of the org.scala-lang:scala3-sbt-bridge:*.**.**-nonbootstrapped project */
@@ -904,7 +907,6 @@ object Build {
904907 (`scala3-repl` / publishLocalBin),
905908 publishLocalBin,
906909 ).evaluated,
907- bspEnabled := false ,
908910 )
909911
910912 /* Configuration of the org.scala-lang:scala3-sbt-bridge:*.**.**-bootstrapped project */
@@ -966,7 +968,7 @@ object Build {
966968 scalaCompilerBridgeBinaryJar := {
967969 Some ((`scala3-sbt-bridge-nonbootstrapped` / Compile / packageBin).value)
968970 },
969- bspEnabled := false ,
971+ bspEnabled := enableBspAllProjects ,
970972 )
971973
972974 /* Configuration of the org.scala-lang:scala3-staging:*.**.**-bootstrapped project */
@@ -1225,7 +1227,8 @@ object Build {
12251227 // Should we also patch .sjsir files
12261228 keepSJSIR := false ,
12271229 // Generate library.properties, used by scala.util.Properties
1228- Compile / resourceGenerators += generateLibraryProperties.taskValue
1230+ Compile / resourceGenerators += generateLibraryProperties.taskValue,
1231+ bspEnabled := enableBspAllProjects,
12291232 )
12301233
12311234 /* Configuration of the org.scala-lang:scala3-library_3:*.**.**-nonbootstrapped project */
@@ -1344,7 +1347,6 @@ object Build {
13441347 keepSJSIR := false ,
13451348 // Generate Scala 3 runtime properties overlay
13461349 Compile / resourceGenerators += generateLibraryProperties.taskValue,
1347- bspEnabled := false ,
13481350 )
13491351
13501352 /* Configuration of the org.scala-lang:scala3-library_3:*.**.**-bootstrapped project */
@@ -1388,7 +1390,7 @@ object Build {
13881390 publish / skip := false ,
13891391 // Project specific target folder. sbt doesn't like having two projects using the same target folder
13901392 target := target.value / " scala3-library-bootstrapped" ,
1391- bspEnabled := false ,
1393+ bspEnabled := enableBspAllProjects ,
13921394 )
13931395
13941396 /* Configuration of the org.scala-js:scalajs-scalalib_2.13:*.**.**-bootstrapped project */
@@ -1982,7 +1984,7 @@ object Build {
19821984 s " -Ddotty.tools.dotc.semanticdb.test= ${(ThisBuild / baseDirectory).value/ " tests" / " semanticdb" }" ,
19831985 )
19841986 },
1985- bspEnabled := false ,
1987+ bspEnabled := enableBspAllProjects ,
19861988 )
19871989
19881990 // ==============================================================================================
@@ -2058,7 +2060,7 @@ object Build {
20582060 scalaCompilerBridgeBinaryJar := {
20592061 Some ((`scala3-sbt-bridge-nonbootstrapped` / Compile / packageBin).value)
20602062 },
2061- bspEnabled := false ,
2063+ bspEnabled := enableBspAllProjects ,
20622064 )
20632065
20642066 lazy val `scala3-presentation-compiler` = project.in(file(" presentation-compiler" ))
@@ -2129,7 +2131,7 @@ object Build {
21292131 mtagsSharedSources
21302132 } (Set (mtagsSharedSourceJar)).toSeq
21312133 }.taskValue,
2132- bspEnabled := false ,
2134+ bspEnabled := enableBspAllProjects ,
21332135 )
21342136 }
21352137
0 commit comments