Skip to content

Commit 31113d7

Browse files
committed
revert: Add back an option to enable bsp in the presentation compiler
1 parent 96849c4 commit 31113d7

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

project/Build.scala

Lines changed: 10 additions & 5 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
@@ -1221,7 +1226,8 @@ object Build {
12211226
// Should we also patch .sjsir files
12221227
keepSJSIR := false,
12231228
// Generate library.properties, used by scala.util.Properties
1224-
Compile / resourceGenerators += generateLibraryProperties.taskValue
1229+
Compile / resourceGenerators += generateLibraryProperties.taskValue,
1230+
bspEnabled := true,
12251231
)
12261232

12271233
/* Configuration of the org.scala-lang:scala3-library_3:*.**.**-nonbootstrapped project */
@@ -1261,7 +1267,7 @@ object Build {
12611267
publish / skip := false,
12621268
// Project specific target folder. sbt doesn't like having two projects using the same target folder
12631269
target := target.value / "scala3-library-nonbootstrapped",
1264-
bspEnabled := false,
1270+
bspEnabled := true,
12651271
)
12661272

12671273
/* Configuration of the org.scala-lang:scala-library:*.**.**-bootstrapped project */
@@ -1339,7 +1345,6 @@ object Build {
13391345
keepSJSIR := false,
13401346
// Generate Scala 3 runtime properties overlay
13411347
Compile / resourceGenerators += generateLibraryProperties.taskValue,
1342-
bspEnabled := false,
13431348
)
13441349

13451350
/* Configuration of the org.scala-lang:scala3-library_3:*.**.**-bootstrapped project */
@@ -2049,7 +2054,7 @@ object Build {
20492054
scalaCompilerBridgeBinaryJar := {
20502055
Some((`scala3-sbt-bridge-nonbootstrapped` / Compile / packageBin).value)
20512056
},
2052-
bspEnabled := false,
2057+
bspEnabled := enableBspAllProjects,
20532058
)
20542059

20552060
lazy val `scala3-presentation-compiler` = project.in(file("presentation-compiler"))
@@ -2120,7 +2125,7 @@ object Build {
21202125
mtagsSharedSources
21212126
} (Set(mtagsSharedSourceJar)).toSeq
21222127
}.taskValue,
2123-
bspEnabled := false,
2128+
bspEnabled := enableBspAllProjects,
21242129
)
21252130
}
21262131

0 commit comments

Comments
 (0)