Using the very latest version of the Play Framework (v2.3) on JDK 8 on Mac OS X and IntelliJ IDEA as my IDE.
While Play correctly recompiles my project source code in the background I never see any change in the browser until I restart the app. I have imported the exact same project on another Mac with all the same software and see it working correctly.
I tried everything I could find online, including run vs ~run and using the new parameters for native vs SBT watcher service. I doubt it's an issue with that as I see lines like this one a few seconds after I change anything in my code:
[info] Compiling 1 Java source to /Users/patrick/IdeaProjects/play-slick-bootstrap3/target/scala-2.11/classes...
Crucially, when I hit refresh on my other computer, I get a message saying reload detected etc.
Any help with this would be much appreciated.
This turned out to be a Mac OS X bug caused in some scenarios where the path that is being monitored for changes has 'issues' with case sensitivity. More information on this issue can be found here
I ran the find-fsevents-bugs application linked to from the above link and it turned out that my home directory path's case was upper-case but showed as lower-case in the Finder. Apparently, this causes Mac OS X to never fire events for anything under this directory - so in my case, nothing was working. I renamed the home directory to lower upper-case via the command line and it started working.
Hope this will be useful to someone else!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With