Skip to content

Commit 1c30392

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

File tree

1 file changed

+16
-11
lines changed

1 file changed

+16
-11
lines changed

project/Build.scala

Lines changed: 16 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -448,10 +448,15 @@ 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,
459+
bspEnabled := enableBspAllProjects,
455460
(Compile / unmanagedSourceDirectories) += baseDirectory.value / "src-bootstrapped",
456461

457462
version := dottyVersion,
@@ -726,7 +731,7 @@ object Build {
726731
(`scala3-compiler-nonbootstrapped` / Test / testOnly).toTask(cmd)
727732
}
728733
}.evaluated,
729-
bspEnabled := false,
734+
// bspEnabled := enableBspAllProjects,
730735
)
731736

732737
/* Configuration of the org.scala-lang:scala3-sbt-bridge:*.**.**-nonbootstrapped project */
@@ -904,7 +909,7 @@ object Build {
904909
(`scala3-repl` / publishLocalBin),
905910
publishLocalBin,
906911
).evaluated,
907-
bspEnabled := false,
912+
// bspEnabled := enableBspAllProjects,
908913
)
909914

910915
/* Configuration of the org.scala-lang:scala3-sbt-bridge:*.**.**-bootstrapped project */
@@ -966,7 +971,7 @@ object Build {
966971
scalaCompilerBridgeBinaryJar := {
967972
Some((`scala3-sbt-bridge-nonbootstrapped` / Compile / packageBin).value)
968973
},
969-
bspEnabled := false,
974+
bspEnabled := enableBspAllProjects,
970975
)
971976

972977
/* Configuration of the org.scala-lang:scala3-staging:*.**.**-bootstrapped project */
@@ -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 := enableBspAllProjects,
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 */
@@ -1381,7 +1386,7 @@ object Build {
13811386
publish / skip := false,
13821387
// Project specific target folder. sbt doesn't like having two projects using the same target folder
13831388
target := target.value / "scala3-library-bootstrapped",
1384-
bspEnabled := false,
1389+
bspEnabled := enableBspAllProjects,
13851390
)
13861391

13871392
/* Configuration of the org.scala-js:scalajs-scalalib_2.13:*.**.**-bootstrapped project */
@@ -1974,7 +1979,7 @@ object Build {
19741979
s"-Ddotty.tools.dotc.semanticdb.test=${(ThisBuild / baseDirectory).value/"tests"/"semanticdb"}",
19751980
)
19761981
},
1977-
bspEnabled := false,
1982+
bspEnabled := enableBspAllProjects,
19781983
)
19791984

19801985
// ==============================================================================================
@@ -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)