Skip to content
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

Rerun code produces a different result (from cache?) #811

Open
devlaam opened this issue Apr 3, 2023 · 1 comment
Open

Rerun code produces a different result (from cache?) #811

devlaam opened this issue Apr 3, 2023 · 1 comment
Labels

Comments

@devlaam
Copy link

devlaam commented Apr 3, 2023

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

  1. Compare https://scastie.scala-lang.org/0Hq775PDQ9OPpmjpmUwVJw with https://scastie.scala-lang.org/98m8172hTW60djK9j65hdw, which are runs on exactly the same code.
  2. Mark the (cached) output (which is correct):
Actor Test started.
Received: Hello World!.
Demo Complete.
  1. Click on 'Run' (maybe twice, if the cache has been deleted in the mean time), get the output:
Actor Test started.
Demo Complete.
  1. One line of output is missing.
  2. 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:
First Run (Correct)

It looks like the second run:
Second Run (Incorrect)
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

@rochala
Copy link
Collaborator

rochala commented Apr 4, 2023

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.

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

No branches or pull requests

2 participants