Skip to content

NoSuchFileException on bloop compile #2653

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
harpocrates opened this issue Apr 14, 2025 · 0 comments
Open

NoSuchFileException on bloop compile #2653

harpocrates opened this issue Apr 14, 2025 · 0 comments

Comments

@harpocrates
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant