Josh Marcus
Josh Marcus

Reputation: 1739

How do I use :replay in SBT to replay previous commands against freshly compiled classes?

In the sbt console, :replay resets execution and replays all previous commands. I would have thought sbt would recompile your classes if there were changes and replay previous commands against your freshly compiled classes. But that doesn't seem to be the case. Do I need to use JRebel for this kind of workflow? My goal is to be able to find a bug in the REPL, fix the bug, and then compile & re-run all previous commands with a single command like :reply.

Upvotes: 2

Views: 635

Answers (1)

OlegYch
OlegYch

Reputation: 1097

:replay is a command of the Scala REPL, not the SBT.

Try running sbt console with JRebel in one shell, and then, in a second shell runsbt ~compile.

The first will give you automatic reloading of recompiled classes; the second will recompile edited classes automatically.

Upvotes: 1

Related Questions