pietro909
pietro909

Reputation: 1861

Play framework runs previous compiled code

I'm having a problem with play framework: when I compile after modifying a single file and run it, it often runs the old compiled code. Seems to be using something like an internal cache.

system: play 2.2.1 built with Scala 2.10.2 (running Java 1.7.0_25)

issue: After recompiling the project and refreshing browser's view it is often still executed the previous code.

fix: clean compile will fix it, by the way it's quite time consuming.

Thank you, Pietro

Upvotes: 1

Views: 291

Answers (1)

Jatin
Jatin

Reputation: 31724

Well this is because you are not running it in development mode i.e. play run.

In this mode, the server will be launched with the auto-reload feature enabled, meaning that for each request Play will check your project and recompile required sources. If needed the application will restart automatically.

Upvotes: 2

Related Questions