Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 14 additions & 6 deletions project/Build.scala
Original file line number Diff line number Diff line change
Expand Up @@ -448,6 +448,11 @@ object Build {
) ++ extMap
}

val enableBspAllProjects = sys.env.get("ENABLE_BSP_ALL_PROJECTS").map(_.toBoolean).getOrElse{
val enableBspAllProjectsFile = file(".enable_bsp_all_projects")
enableBspAllProjectsFile.exists()
}

// Settings used when compiling dotty with a non-bootstrapped dotty
lazy val commonBootstrappedSettings = commonDottySettings ++ Seq(
// To enable support of scaladoc and language-server projects you need to change this to true
Expand Down Expand Up @@ -1344,7 +1349,7 @@ object Build {
keepSJSIR := false,
// Generate Scala 3 runtime properties overlay
Compile / resourceGenerators += generateLibraryProperties.taskValue,
bspEnabled := false,
bspEnabled := enableBspAllProjects,
)

/* Configuration of the org.scala-lang:scala3-library_3:*.**.**-bootstrapped project */
Expand Down Expand Up @@ -1388,7 +1393,7 @@ object Build {
publish / skip := false,
// Project specific target folder. sbt doesn't like having two projects using the same target folder
target := target.value / "scala3-library-bootstrapped",
bspEnabled := false,
bspEnabled := enableBspAllProjects,
)

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

// ==============================================================================================
Expand Down Expand Up @@ -2058,7 +2063,7 @@ object Build {
scalaCompilerBridgeBinaryJar := {
Some((`scala3-sbt-bridge-nonbootstrapped` / Compile / packageBin).value)
},
bspEnabled := false,
bspEnabled := enableBspAllProjects,
)

lazy val `scala3-presentation-compiler` = project.in(file("presentation-compiler"))
Expand Down Expand Up @@ -2129,13 +2134,16 @@ object Build {
mtagsSharedSources
} (Set(mtagsSharedSourceJar)).toSeq
}.taskValue,
bspEnabled := false,
bspEnabled := enableBspAllProjects,
)
}

lazy val `scala3-presentation-compiler-testcases` = project.in(file("presentation-compiler-testcases"))
.dependsOn(`scala3-compiler-bootstrapped-new`)
.settings(commonBootstrappedSettings)
.settings(
commonBootstrappedSettings,
bspEnabled := enableBspAllProjects,
)

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