Skip to content

Commit 6898753

Browse files
committed
Add Bloop-specific environment variables
1 parent d29b748 commit 6898753

File tree

1 file changed

+32
-1
lines changed
  • modules/core/src/main/scala/scala/build/internals

1 file changed

+32
-1
lines changed

modules/core/src/main/scala/scala/build/internals/EnvVar.scala

Lines changed: 32 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ object EnvVar {
5757
}""".stripMargin
5858
}
5959
}
60-
def allGroups: Seq[EnvVarGroup] = Seq(ScalaCli, Java, Coursier, Spark, Misc, Internal)
60+
def allGroups: Seq[EnvVarGroup] = Seq(ScalaCli, Java, Bloop, Coursier, Spark, Misc, Internal)
6161
def all: Seq[EnvVar] = allGroups.flatMap(_.all)
6262
def allBsp: Seq[EnvVar] = all.filter(_.passToIde)
6363
object Java extends EnvVarGroup {
@@ -83,6 +83,7 @@ object EnvVar {
8383
val dyldLibraryPath = EnvVar("DYLD_LIBRARY_PATH", "Runtime library paths on Mac OS X")
8484
val ldLibraryPath = EnvVar("LD_LIBRARY_PATH", "Runtime library paths on Linux")
8585
val pathExt = EnvVar("PATHEXT", "Executable file extensions on Windows")
86+
val pwd = EnvVar("PWD", "Current working directory", passToIde = false)
8687
val shell = EnvVar("SHELL", "The currently used shell")
8788
val vcVarsAll = EnvVar("VCVARSALL", "Visual C++ Redistributable Runtimes")
8889
val zDotDir = EnvVar("ZDOTDIR", "Zsh configuration directory")
@@ -108,6 +109,7 @@ object EnvVar {
108109
vendoredZipInputStream
109110
)
110111
val config = EnvVar("SCALA_CLI_CONFIG", "Scala CLI configuration file path")
112+
val extraTimeout = Bloop.bloopExtraTimeout.copy(requiresPower = false)
111113
val home = EnvVar("SCALA_CLI_HOME", "Scala CLI home directory")
112114
val interactive = EnvVar("SCALA_CLI_INTERACTIVE", "Interactive mode toggle")
113115
val interactiveInputs = EnvVar("SCALA_CLI_INTERACTIVE_INPUTS", "Interactive mode inputs")
@@ -124,6 +126,35 @@ object EnvVar {
124126
val sparkHome = EnvVar("SPARK_HOME", "Spark installation directory", requiresPower = true)
125127
}
126128

129+
object Bloop extends EnvVarGroup {
130+
override def groupName: String = "Bloop"
131+
override def all = Seq(
132+
bloopComputationCores,
133+
bloopDaemonDir,
134+
bloopJavaOpts,
135+
bloopModule,
136+
bloopPort,
137+
bloopScalaVersion,
138+
bloopVersion,
139+
bloopServer,
140+
bloopExtraTimeout
141+
)
142+
val bloopComputationCores = EnvVar(
143+
"BLOOP_COMPUTATION_CORES",
144+
"Number of computation cores to be used",
145+
requiresPower = true
146+
)
147+
val bloopDaemonDir = EnvVar("BLOOP_DAEMON_DIR", "Bloop daemon directory", requiresPower = true)
148+
val bloopJavaOpts = EnvVar("BLOOP_JAVA_OPTS", "Bloop Java options", requiresPower = true)
149+
val bloopModule = EnvVar("BLOOP_MODULE", "Bloop default module", requiresPower = true)
150+
val bloopPort = EnvVar("BLOOP_PORT", "Bloop default port", requiresPower = true)
151+
val bloopScalaVersion =
152+
EnvVar("BLOOP_SCALA_VERSION", "Bloop default Scala version", requiresPower = true)
153+
val bloopVersion = EnvVar("BLOOP_VERSION", "Bloop default version", requiresPower = true)
154+
val bloopServer = EnvVar("BLOOP_SERVER", "Bloop default host", requiresPower = true)
155+
val bloopExtraTimeout = EnvVar("SCALA_CLI_EXTRA_TIMEOUT", "Extra timeout", requiresPower = true)
156+
}
157+
127158
object Internal extends EnvVarGroup {
128159
override def groupName: String = "Internal"
129160
def all = Seq(ci)

0 commit comments

Comments
 (0)