Setup details 1. IntelliJ Idea Community Edition 2018.2.5 with sbt plugin 2. PlayFramework 3. scalaVersion 2.12.8 4. Java 1.8 (open JDK) 5. sbt: bundled sbt with play-scala-hello-world-tutorial 6. Host OS: Limux Mint 18.3, KDE Plasma 5
Issue: I tried using the hello-world project template from Playframework - using IntelliJ to import it as an sbt project and accepting the default settings. After making some edits I deleted the project in the filesystem directly and replaced it with a fresh copy. However, when I run the project using the sbt_command window with the command 'run', the project launches Play bound to port 9000 and the running project still shows the 'old' modified version of the app.
Steps to reproduce the problem:
- Load 2.7.x version of play-scala-hello-world-tutorial
Edit HomeController.scala;
from
def index() = Action { implicit request: Request[AnyContent] => Ok(views.html.index()) }
to
def index() = Action { implicit request: Request[AnyContent] => Ok("Just Play Scala") }
- sbt_run
- Ctrl+D to quit running app (in IDE's sbt command window)
- Close IntellijIDEA
- Delete project root folder in Idea Workspace
- Place with fresh copy of play-scala-hello-world-tutorial scala-seed project template
- Import project
- Run using sbt 'run' command (in IDE's sbt command window)
- view http://localhost:9000/ => results in "Just Play Scala"
Attempted resolutions - Closed project from IntelliJ and deleted the project root folder from the IntelliJ-Idea workspace on the filesystem - Performed #1 and deleted .ivy2 and .mvn directories - Tried to reproduce the problem in a VM running Fedora28 using a text editor to replicate the changes. Everything works as expected. All changes are reloaded dynamically in play and changes are visible in the ruuning app.
Diagnosis Either IntelliJ does not work as expected/ advertised for recompiling sbt projects or I do not know how to use the IDE to properly purge previously compiled code.