Skip to content

Commit

Permalink
Merge pull request #124 from alexarchambault/fix-java-8-issue
Browse files Browse the repository at this point in the history
Fix trapped stderr, discard files from JAR filesystems
  • Loading branch information
alexarchambault authored Nov 29, 2022
2 parents 96ac004 + 38c1416 commit 7169d10
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -82,16 +82,24 @@ object BloopIncremental {
val setOfSources = sources.toSet
val incremental = new BloopNameHashing(log, uniqueInputs, options, profiler.profileRun, tracer)
val initialChanges = incremental.detectInitialChanges(setOfSources, previous, current, lookup, converter, output)
def isJrt(path: Path) = path.getFileSystem.provider().getScheme == "jrt"
def ignore(path: Path) = {
val scheme = path.getFileSystem.provider().getScheme
scheme == "jrt" || scheme == "jar"
}
val binaryChanges = new DependencyChanges {
val modifiedLibraries = initialChanges.libraryDeps.toArray

val modifiedBinaries: Array[File] = modifiedLibraries
.map(converter.toPath(_))
.collect {
// jrt path is neither a jar nor a normal file
case path if !isJrt(path) =>
path.toFile()
case path if !ignore(path) =>
try path.toFile()
catch {
case e: UnsupportedOperationException =>
System.err.println(s"Error converting $path (provider scheme ${path.getFileSystem.provider().getScheme}) to a file: $e")
throw e
}
}
.distinct
val modifiedClasses = initialChanges.external.allModified.toArray
Expand Down
12 changes: 11 additions & 1 deletion frontend/src/main/scala/bloop/Bloop.scala
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,17 @@ object Bloop {
}

val server =
new NGServer(address, poolSize, heartbeatMs, in, out, err, javaLogger, domainSocketProvider)
new NGServer(
address,
poolSize,
heartbeatMs,
in,
out,
err,
javaLogger,
domainSocketProvider,
false
)
registerAliases(server)
ProxySetup.init()
server
Expand Down
2 changes: 1 addition & 1 deletion project/Dependencies.scala
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ object Dependencies {
import sbt.librarymanagement.syntax.stringToOrganization
val zinc = "org.scala-sbt" %% "zinc" % zincVersion
val bsp4s = "ch.epfl.scala" %% "bsp4s" % bspVersion
val nailgun = "io.github.alexarchambault.bleep" % "nailgun-server" % "1.0.3"
val nailgun = "io.github.alexarchambault.bleep" % "nailgun-server" % "1.0.4"
val javaDebug = "ch.epfl.scala" % "com-microsoft-java-debug-core" % javaDebugVersion

val libraryManagement = "org.scala-sbt" %% "librarymanagement-ivy" % lmVersion
Expand Down

0 comments on commit 7169d10

Please sign in to comment.