Skip to content

Commit 18d8cc9

Browse files
committed
revert: Add back an option to enable bsp in the presentation compiler
1 parent 9a8746e commit 18d8cc9

File tree

1 file changed

+15
-6
lines changed

1 file changed

+15
-6
lines changed

project/Build.scala

Lines changed: 15 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
// 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
@@ -1225,7 +1230,8 @@ object Build {
12251230
// Should we also patch .sjsir files
12261231
keepSJSIR := false,
12271232
// Generate library.properties, used by scala.util.Properties
1228-
Compile / resourceGenerators += generateLibraryProperties.taskValue
1233+
Compile / resourceGenerators += generateLibraryProperties.taskValue,
1234+
bspEnabled := enableBspAllProjects,
12291235
)
12301236

12311237
/* Configuration of the org.scala-lang:scala3-library_3:*.**.**-nonbootstrapped project */
@@ -1388,7 +1394,7 @@ object Build {
13881394
publish / skip := false,
13891395
// Project specific target folder. sbt doesn't like having two projects using the same target folder
13901396
target := target.value / "scala3-library-bootstrapped",
1391-
bspEnabled := false,
1397+
bspEnabled := enableBspAllProjects,
13921398
)
13931399

13941400
/* Configuration of the org.scala-js:scalajs-scalalib_2.13:*.**.**-bootstrapped project */
@@ -1982,7 +1988,7 @@ object Build {
19821988
s"-Ddotty.tools.dotc.semanticdb.test=${(ThisBuild / baseDirectory).value/"tests"/"semanticdb"}",
19831989
)
19841990
},
1985-
bspEnabled := false,
1991+
bspEnabled := enableBspAllProjects,
19861992
)
19871993

19881994
// ==============================================================================================
@@ -2058,7 +2064,7 @@ object Build {
20582064
scalaCompilerBridgeBinaryJar := {
20592065
Some((`scala3-sbt-bridge-nonbootstrapped` / Compile / packageBin).value)
20602066
},
2061-
bspEnabled := false,
2067+
bspEnabled := enableBspAllProjects,
20622068
)
20632069

20642070
lazy val `scala3-presentation-compiler` = project.in(file("presentation-compiler"))
@@ -2129,13 +2135,16 @@ object Build {
21292135
mtagsSharedSources
21302136
} (Set(mtagsSharedSourceJar)).toSeq
21312137
}.taskValue,
2132-
bspEnabled := false,
2138+
bspEnabled := enableBspAllProjects,
21332139
)
21342140
}
21352141

21362142
lazy val `scala3-presentation-compiler-testcases` = project.in(file("presentation-compiler-testcases"))
21372143
.dependsOn(`scala3-compiler-bootstrapped-new`)
2138-
.settings(commonBootstrappedSettings)
2144+
.settings(
2145+
commonBootstrappedSettings,
2146+
bspEnabled := enableBspAllProjects,
2147+
)
21392148

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

0 commit comments

Comments
 (0)