-
Notifications
You must be signed in to change notification settings - Fork 206
Description
Here is the error message at the CLI running bloop compile
(slightly redacted because this is from a closed source enterprise codebase):
Compiling project1 (77 Scala sources)
[W] [E-1] one deprecation (since 23.31); re-run with -deprecation for details
Compiled project1 (18432ms)
[E] Unexpected error when compiling project2: java.nio.file.NoSuchFileException: /tmp/.bloop/project2/project2/out/bloop-bsp-clients-classes/classes-CustomBloopClient-GO6XrTalT5GbywKxOhpJew==/com/project2/myPackage/MyClass$$anonfun$$lessinit$greater$42.class
[E] at java.base/sun.nio.fs.UnixException.translateToIOException(UnixException.java:92)
[E] at java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:106)
[E] at java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:111)
[E] at java.base/sun.nio.fs.UnixFileSystemProvider.implDelete(UnixFileSystemProvider.java:248)
[E] at java.base/sun.nio.fs.AbstractFileSystemProvider.delete(AbstractFileSystemProvider.java:105)
[E] at java.base/java.nio.file.Files.delete(Files.java:1152)
[E] at bloop.Compiler$$anon$3.$anonfun$trigger$18(Compiler.scala:699)
[E] at bloop.Compiler$$anon$3.$anonfun$trigger$18$adapted(Compiler.scala:691)
[E] at scala.collection.mutable.HashSet.foreach(HashSet.scala:79)
[E] at bloop.Compiler$$anon$3.$anonfun$trigger$17(Compiler.scala:691)
[E] at scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.java:23)
[E] at monix.eval.internal.TaskRunLoop$.startFull(TaskRunLoop.scala:81)
[E] at monix.eval.internal.TaskRestartCallback.syncOnSuccess(TaskRestartCallback.scala:101)
[E] at monix.eval.internal.TaskRestartCallback.onSuccess(TaskRestartCallback.scala:74)
[E] at monix.eval.internal.TaskShift$Register$$anon$1.run(TaskShift.scala:65)
[E] at monix.execution.internal.InterceptRunnable.run(InterceptRunnable.scala:27)
[E] at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
[E] at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
[E] at java.base/java.lang.Thread.run(Thread.java:840)
[E] Failed to compile 'project2'
This is almost certainly related to the fact that we have a second Bloop client (CustomBloopClient
) also issuing sometimes concurrent compilation requests. My understanding is that Bloop should handle that sort of concurrent request just fine, so this should be a bug.
AFAICT, seems like this is a case where Bloop is expecting to copy some compiled class out of the class directory configured for the other client in order to reuse it in the latest CLI-requested compilation, but the file doesn't actually exist in the output directory of the other client. The other custom client is just communicating over BSP with Bloop, basically only really requesting compilation and then making classloaders to hot-load the compiled outputs.