cats-effect
cats-effect copied to clipboard
Global runtime installation mechanism not working in Scastie
My guess is that Scastie isn't classloader-isolating applications as completely as it should be. Any ideas, @OlegYch?
scastie is just doing sbt run
with turbo
on
the example seems to work with turbo
off https://scastie.scala-lang.org/LZX9fcYXSjuaNh1mHswV9Q
turbo
is supposed to improve run
performance by reusing already loaded library jars, but i'm not sure how useful it actually is
would be nice if cats could work with it though
Hmm, how exactly does turbo work in this context? This may be something we need to explicitly detect. It would be concerning though if there was any sharing or IORuntime instances across runs.
Tried the scastie with CE v3.4.10 and v3.5.0-RC5. The good news is that it no longer crashes on the second invocation but it does log a warning that the global runtime is already installed. The bad news is that it then proceeds to hang 😅
Update: seems to be hanging here. https://github.com/typelevel/cats-effect/blob/c430fceceee128fdd91a4976c5b67893c607eef1/core/jvm/src/main/scala/cats/effect/IOApp.scala#L442