-
Notifications
You must be signed in to change notification settings - Fork 137
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
Timeouts from bloop-rifle and watch mode issues since 1.5.x. #3343
Comments
Yeah... I can reproduce it alright. |
So... to reproduce it, it's enough to just run: @main def main(): Unit = println("Hello") with scala-cli run . --watch and then modify the file 5 times. Here's the stacktrace: java.lang.Exception: Timeout while waiting for buildInitialize response
bloop.rifle.BloopServer$.buildServer(BloopServer.scala:223)
scala.build.compiler.BloopCompilerMaker.$anonfun$1(BloopCompilerMaker.scala:48)
scala.build.compiler.BloopCompiler.<init>(BloopCompiler.scala:15)
scala.build.compiler.BloopCompilerMaker.$anonfun$2(BloopCompilerMaker.scala:51)
scala.util.Try$.apply(Try.scala:217)
scala.build.compiler.BloopCompilerMaker.create(BloopCompilerMaker.scala:51)
scala.build.Build$.info$1$$anonfun$1(Build.scala:697)
scala.build.EitherCps$Helper.apply(EitherCps.scala:19)
scala.build.Build$.info$1(Build.scala:687)
scala.build.Build$.run$1(Build.scala:715)
scala.build.Build$.$anonfun$24(Build.scala:748)
scala.build.Build$.$anonfun$adapted$1(Build.scala:748)
scala.Function0.apply$mcV$sp(Function0.scala:42)
scala.build.Build$Watcher.$init$$$anonfun$1(Build.scala:1274)
java.base@17.0.6/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539)
java.base@17.0.6/java.util.concurrent.FutureTask.run(FutureTask.java:264)
java.base@17.0.6/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304)
java.base@17.0.6/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
java.base@17.0.6/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
java.base@17.0.6/java.lang.Thread.run(Thread.java:833)
com.oracle.svm.core.thread.PlatformThreads.threadStartRoutine(PlatformThreads.java:775)
com.oracle.svm.core.posix.thread.PosixPlatformThreads.pthreadStartRoutine(PosixPlatformThreads.java:203)
java.util.concurrent.TimeoutException
java.base@17.0.6/java.util.concurrent.CompletableFuture.timedGet(CompletableFuture.java:1960)
java.base@17.0.6/java.util.concurrent.CompletableFuture.get(CompletableFuture.java:2095)
bloop.rifle.BloopServer$.buildServer(BloopServer.scala:220)
scala.build.compiler.BloopCompilerMaker.$anonfun$1(BloopCompilerMaker.scala:48)
scala.build.compiler.BloopCompiler.<init>(BloopCompiler.scala:15)
scala.build.compiler.BloopCompilerMaker.$anonfun$2(BloopCompilerMaker.scala:51)
scala.util.Try$.apply(Try.scala:217)
scala.build.compiler.BloopCompilerMaker.create(BloopCompilerMaker.scala:51)
scala.build.Build$.info$1$$anonfun$1(Build.scala:697)
scala.build.EitherCps$Helper.apply(EitherCps.scala:19)
scala.build.Build$.info$1(Build.scala:687)
scala.build.Build$.run$1(Build.scala:715)
scala.build.Build$.$anonfun$24(Build.scala:748)
scala.build.Build$.$anonfun$adapted$1(Build.scala:748)
scala.Function0.apply$mcV$sp(Function0.scala:42)
scala.build.Build$Watcher.$init$$$anonfun$1(Build.scala:1274)
java.base@17.0.6/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539)
java.base@17.0.6/java.util.concurrent.FutureTask.run(FutureTask.java:264)
java.base@17.0.6/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304)
java.base@17.0.6/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
java.base@17.0.6/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
java.base@17.0.6/java.lang.Thread.run(Thread.java:833)
com.oracle.svm.core.thread.PlatformThreads.threadStartRoutine(PlatformThreads.java:775)
com.oracle.svm.core.posix.thread.PosixPlatformThreads.pthreadStartRoutine(PosixPlatformThreads.java:203) cc @tgodzik |
For sure we should not need to reconnect every time and looks like Bloop is no handling that very well. I am not sure however why is that happening, but we can add similar tests in the bloop repo to se if it reproduces. |
Version(s)
1.5.4
Describe the bug
Very frequent timeouts from bloop-rifle, and watch mode occasionally refusing to pick up changes - only restarting helps, but then it crashes again
https://discord.com/channels/632150470000902164/901153021638082660/1312768811602284617
To Reproduce
I get it constantly when working on https://github.com/keynmol/cue4s-xterm-demo but I've seen it in all projects that I have that use --watch mode.
Just run
scala-cli --power package . -w -f -o scalajs-frontend.js --js-module-kind es
and edit files for a bit - eventually it will crash.Expected behaviour
Doesn't crash or times out
The text was updated successfully, but these errors were encountered: