playframework icon indicating copy to clipboard operation
playframework copied to clipboard

Any modification in Play's view kicks off dependencies resolution

Open przemyslawsokol opened this issue 11 years ago • 2 comments

I've noticed this strange behavior in Play 2.3.7 - when I'm working in a development mode with Play application running (started with ~run command), whenever I introduce some modification in Play's *.scala.html view (even the most innocent one, like adding a single character to HTML comment) and then refresh the app's page in a browser, Play issues a full dependencies resolution (the same as is performed on SBT update call) and restarts the application only after that time consuming process.

I've also noticed, that it's only the case when my Bash console is not focused before I refresh the page. The other way round, when I make the same kind of change and focus the console, Play only performs a 1-2 seconds compilation, without unnecessary dependencies resolution (only then can I instantly refresh the page).

przemyslawsokol avatar Mar 17 '15 11:03 przemyslawsokol

This would be better asked on the mailing list, as it's not likely a bug in Play. Possibilities include:

  • You have two sbt processes running on the same directory (one could be coming from an IDE, I've noticed IntelliJ causing problems here)
  • Something in your build is messing with the resolution cache directory
  • You have some dependencies that ivy doesn't know how to cache properly

Given that the change in focus seems to be implementing it, I wouldn't be surprised if an IDE is the culprit - IntelliJ does things on change focus, so although it appears to you to be the focus of the console that matters, it may actually be the focus of the IDE.

jroper avatar Mar 17 '15 23:03 jroper

I just tested this with my Play project and could not reproduce it, which backs up @jroper's suggestion that this probably isn't a bug in Play, so I'm going to close this. That being said, I think James gave some great suggestions of things to check, so if you find it's one of those problems, it could be helpful to post back here for others that might find this issue on Google. Otherwise, if you're still stuck, the mailing list is generally a better forum for questions

benmccann avatar Mar 18 '15 16:03 benmccann