Skip to content

Commit cf20829

Browse files
committed
Small build cleanup
1 parent 9994ebf commit cf20829

File tree

1 file changed

+3
-12
lines changed

1 file changed

+3
-12
lines changed

project/Build.scala

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -61,9 +61,6 @@ object Build {
6161
}
6262
val dottyNonBootstrappedVersion = dottyVersion + "-nonbootstrapped"
6363

64-
val DRONE_MEM = "dotty.drone.mem"
65-
66-
6764
val agentOptions = List(
6865
// "-agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=5005"
6966
// "-agentpath:/home/dark/opt/yjp-2013-build-13072/bin/linux-x86-64/libyjpagent.so"
@@ -133,19 +130,13 @@ object Build {
133130

134131
// Settings shared globally (scoped in Global). Used in build.sbt
135132
lazy val globalSettings = Def.settings(
136-
// Override `runCode` from sbt-dotty to use the language-server and
137-
// vscode extension from the source repository of dotty instead of a
138-
// published version.
139-
runCode := (run in `dotty-language-server`).toTask("").value,
140-
141133
onLoad := (onLoad in Global).value andThen { state =>
142134
def exists(submodule: String) = {
143135
val path = Paths.get(submodule)
144136
Files.exists(path) && {
145137
val fileStream = Files.list(path)
146-
val nonEmpty = fileStream.iterator().hasNext()
147-
fileStream.close()
148-
nonEmpty
138+
try fileStream.iterator().hasNext()
139+
finally fileStream.close()
149140
}
150141
}
151142

@@ -546,7 +537,7 @@ object Build {
546537
} yield "-Xbootclasspath/p:" + path
547538

548539
val ci_build = // propagate if this is a ci build
549-
sys.props.get(DRONE_MEM) match {
540+
sys.props.get("dotty.drone.mem") match {
550541
case Some(prop) => List("-Xmx" + prop)
551542
case _ => List()
552543
}

0 commit comments

Comments
 (0)