Skip to content

Commit e4fe715

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

File tree

1 file changed

+13
-5
lines changed

1 file changed

+13
-5
lines changed

project/Build.scala

Lines changed: 13 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
@@ -1388,7 +1393,7 @@ object Build {
13881393
publish / skip := false,
13891394
// Project specific target folder. sbt doesn't like having two projects using the same target folder
13901395
target := target.value / "scala3-library-bootstrapped",
1391-
bspEnabled := false,
1396+
bspEnabled := enableBspAllProjects,
13921397
)
13931398

13941399
/* Configuration of the org.scala-js:scalajs-scalalib_2.13:*.**.**-bootstrapped project */
@@ -1982,7 +1987,7 @@ object Build {
19821987
s"-Ddotty.tools.dotc.semanticdb.test=${(ThisBuild / baseDirectory).value/"tests"/"semanticdb"}",
19831988
)
19841989
},
1985-
bspEnabled := false,
1990+
bspEnabled := enableBspAllProjects,
19861991
)
19871992

19881993
// ==============================================================================================
@@ -2058,7 +2063,7 @@ object Build {
20582063
scalaCompilerBridgeBinaryJar := {
20592064
Some((`scala3-sbt-bridge-nonbootstrapped` / Compile / packageBin).value)
20602065
},
2061-
bspEnabled := false,
2066+
bspEnabled := enableBspAllProjects,
20622067
)
20632068

20642069
lazy val `scala3-presentation-compiler` = project.in(file("presentation-compiler"))
@@ -2129,13 +2134,16 @@ object Build {
21292134
mtagsSharedSources
21302135
} (Set(mtagsSharedSourceJar)).toSeq
21312136
}.taskValue,
2132-
bspEnabled := false,
2137+
bspEnabled := enableBspAllProjects,
21332138
)
21342139
}
21352140

21362141
lazy val `scala3-presentation-compiler-testcases` = project.in(file("presentation-compiler-testcases"))
21372142
.dependsOn(`scala3-compiler-bootstrapped-new`)
2138-
.settings(commonBootstrappedSettings)
2143+
.settings(
2144+
commonBootstrappedSettings,
2145+
bspEnabled := enableBspAllProjects,
2146+
)
21392147

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

0 commit comments

Comments
 (0)