Skip to content

Commit 6d21346

Browse files
committed
revert: Add back an option to enable bsp in the presentation compiler
1 parent d5fec8f commit 6d21346

File tree

1 file changed

+14
-6
lines changed

1 file changed

+14
-6
lines changed

project/Build.scala

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -448,6 +448,11 @@ 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
// Setups up doc / scalaInstance to use in the bootstrapped projects instead of the default one
452457
lazy val scaladocDerivedInstanceSettings = Def.settings(
453458
// We cannot include scaladoc in the regular `scalaInstance` task because
@@ -1377,7 +1382,7 @@ object Build {
13771382
keepSJSIR := false,
13781383
// Generate Scala 3 runtime properties overlay
13791384
Compile / resourceGenerators += generateLibraryProperties.taskValue,
1380-
bspEnabled := false,
1385+
bspEnabled := enableBspAllProjects,
13811386
)
13821387

13831388
/* Configuration of the org.scala-lang:scala3-library_3:*.**.**-bootstrapped project */
@@ -1421,7 +1426,7 @@ object Build {
14211426
publish / skip := false,
14221427
// Project specific target folder. sbt doesn't like having two projects using the same target folder
14231428
target := target.value / "scala3-library-bootstrapped",
1424-
bspEnabled := false,
1429+
bspEnabled := enableBspAllProjects,
14251430
)
14261431

14271432
/* Configuration of the org.scala-js:scalajs-scalalib_2.13:*.**.**-bootstrapped project */
@@ -2018,7 +2023,7 @@ object Build {
20182023
s"-Ddotty.tools.dotc.semanticdb.test=${(ThisBuild / baseDirectory).value/"tests"/"semanticdb"}",
20192024
)
20202025
},
2021-
bspEnabled := false,
2026+
bspEnabled := enableBspAllProjects,
20222027
)
20232028

20242029
// ==============================================================================================
@@ -2095,7 +2100,7 @@ object Build {
20952100
scalaCompilerBridgeBinaryJar := {
20962101
Some((`scala3-sbt-bridge-nonbootstrapped` / Compile / packageBin).value)
20972102
},
2098-
bspEnabled := false,
2103+
bspEnabled := enableBspAllProjects,
20992104
)
21002105

21012106
lazy val `scala3-presentation-compiler` = project.in(file("presentation-compiler"))
@@ -2166,13 +2171,16 @@ object Build {
21662171
mtagsSharedSources
21672172
} (Set(mtagsSharedSourceJar)).toSeq
21682173
}.taskValue,
2169-
bspEnabled := false,
2174+
bspEnabled := enableBspAllProjects,
21702175
)
21712176
}
21722177

21732178
lazy val `scala3-presentation-compiler-testcases` = project.in(file("presentation-compiler-testcases"))
21742179
.dependsOn(`scala3-compiler-bootstrapped-new`)
2175-
.settings(commonBootstrappedSettings)
2180+
.settings(
2181+
commonBootstrappedSettings,
2182+
bspEnabled := enableBspAllProjects,
2183+
)
21762184

21772185
lazy val `scala3-language-server` = project.in(file("language-server")).
21782186
dependsOn(`scala3-compiler-bootstrapped-new`, `scala3-repl`).

0 commit comments

Comments
 (0)