Rerun code produces a different result (from cache?)
devlaam opened this issue · 1 comments
Describe the bug
A piece of code which is run for the first time produces the correct result. After a second run (with or without minor changes) only a partial result is presented.
Scastie snippet link
https://scastie.scala-lang.org/0Hq775PDQ9OPpmjpmUwVJw
To Reproduce
- Compare https://scastie.scala-lang.org/0Hq775PDQ9OPpmjpmUwVJw with https://scastie.scala-lang.org/98m8172hTW60djK9j65hdw, which are runs on exactly the same code.
- Mark the (cached) output (which is correct):
Actor Test started.
Received: Hello World!.
Demo Complete.
- Click on 'Run' (maybe twice, if the cache has been deleted in the mean time), get the output:
Actor Test started.
Demo Complete.
- One line of output is missing.
- The Scastie cache links themselves seem constant, so this is not the source of the trouble.
Expected behavior
Equal results in equal circumstances, first run:
It looks like the second run:
is relying on some cached output, but misses one output stream. The application seems not to be complete restarted?
As long as the logs below are displayed, the results are correct:
[info] welcome to sbt 1.8.2 (Alpine Java 17.0.6)
[info] loading settings for project scastie4824172637242059690-build from plugins.sbt ...
[info] loading settings for project scastie4824172637242059690 from build.sbt ...
When not, it is incorrect, and the runtime is also to low for a correct result to be generated.
Screenshot ( Optional )
No response
Version
Scastie website
What browsers are you seeing the problem on?
Safari
Relevant log output
No response
I quickly took a look at this issue, the problem is in our SBT plugin which is added to every Scastie snippet. I'll investigate it further in a near future.