3
votes

Whenever I make a change on my Play app, it doesn't re-compile (auto-reload?) the changes and when I refresh the page I see the old version of the app. I have to Control + D every time I make a change to the source code, and that's not convenient.

I tried it on old apps, created new app, activator clean, activator ~ run ... doesn't help

...any ideas?

1
@RichDougherty - thanks, i've looked into that and it seems to be working for now. - ameernuri

1 Answers

2
votes

Got it to work using this answer to an issue submitted on Github

The simplest workaround is to use polling instead, by adding the following to your build:

PlayKeys.playWatchService := play.sbtplugin.run.PlayWatchService.sbt(pollInterval.value)

Note that I would not use this in combination with ~run, because it will mean that Play and sbt will both be polling for changes in 2 separate threads, which is going to chew up a lot of cpu. Rather, just use it with run.