Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Scala Play development workflow (IDE)

To all the scala developers out there, could you share the workflow for your daily development work, especially if you work on Play2?

I was very eager to jump on Scala and Play for my future projects because of all the cool features Scala has to offer. However, I found that development in Play has been a pain in the neck to the point that I found it no longer productive. Initially I used Eclipse Luna, and very often I got false positive error highlights. I tried to clean and recompile. Sometimes the errors went away, and came back later. I didn't even get auto import; I had to look up the packages manually instead of having a list packages to choose from.

I still believe that Scala is the next best thing for me to try, so I got myself IDEA14 Ultimate, with Scala plugin. I thought that things would be much better, but again, I also got false positive error highlight (with different error messages from those in Eclipse). Even simple functions like Action, or Ok reported errors. When I started using library like Slick, I got red all over my files.

Is there any workaround at the moment to make either Eclipse or IDEA14 play nice with Play? I appreciate any input.

scala version: 2.11.4 java version: 1.8

like image 379
Khanetor Avatar asked Nov 09 '22 22:11

Khanetor


1 Answers

Presumably you come from a Java background? Java tooling is amazing. You take it for granted that everything just works so perfectly. It wasn't always like that, it took many years for Java tooling to mature to the point it is today. Now Java developers are so used to everything working perfectly that tiny tiny issues such as false negatives/postives with IDE errors stand out like a "pain in the neck". I come from a Java background, and I use IntelliJ every day. There are false negatives all through the Play codebase that IntelliJ highlights, especially in SBT plugins. But I don't notice them anymore, they don't get in my way. 99% of the time IntelliJ gets it right, and that's enough to make it still very useful and to allow me to be productive.

So my advice to you is to not rely on the tooling as if it's a life support system - unlike Java, you don't need to be on life support when you code Scala. I use SBT for a lot of things that I used to use an IDE for, eg running tests, the SBT console is great for that, much easier to use than clunky point and click UIs for configuring/running tests. Take a deep breath of air without life support and enjoy the independence that Scala gives you.

like image 159
James Roper Avatar answered Nov 15 '22 10:11

James Roper