Scala Play Development Workflow (IDE)

For all scala developers, could you share the workflow for daily development work, especially if you work in Play2?

I really wanted to jump on scala and play for my future projects because of all the interesting features of scala. However, I found that the development of Play was a pain in the neck to such an extent that I found that it was no longer productive. I originally used the Eclipse Luna, and very often I received false positive errors. I tried to clean and recompile. Sometimes errors went away and returned later. I did not even import a car; I had to search for packages manually, and not have a list of packages to choose from.

I still think scala is the best you can try, so I got IDEA14 Ultimate with the scala plugin. I thought that everything would be much better, but again, I also have a false positive error (with different error messages from Eclipse). Even simple functions like Action or Ok report errors. When I started using a library like Slick, I blushed over all of my files. Is there any workaround for now to get Eclipse or IDEA14 to play with Play? I appreciate any input. scala version: 2.11.4 java version: 1.8

+5
source share
2 answers

Turns out I missed a line in the doc release . Starting with the latest version of Scala 2.11, it is not compatible with Java 8.

Scala 2.11.x series is aimed at Java 6, with (developing) experimental support for Java 8. In version 2.11.1, support for Java 8 is mostly limited to reading Java 8 bytecode and parsing Java 8 source. Stay tuned for full (experimental) support Java 8. The next major release, 2.12, will most likely target Java 8 by default.

I installed Java 7, and although I do not need to switch the Java system to 7, I can choose Java 7 in Eclipse or IDEA.

0
source

Supposedly, you came from a Java background? The Java tool is awesome. You take for granted that everything works so beautifully. This was not always the case; it took many years for Java tools to mature to the extent they are today. Now, Java developers are so used to everything that works great, that tiny tiny problems, such as false negatives / IDE error messages, stand out as "neck pain." I come from the Java background and every day I use IntelliJ. There are false negatives throughout the Play codebase that stand out for IntelliJ, especially in SBT plugins. But I don’t notice them anymore, they don’t bother me. 99% of the time IntelliJ understands this correctly, and this is enough to make it very useful and allow me to be productive.

So, my advice to you is not to rely on snap-ins as a life support system - unlike Java, you do not need to support life when coding Scala. I use SBT for many things that I used to use the IDE, for example, to run tests, the SBT console is great for this, much easier to use than clumsy dots and click the UI to configure / run the tests. Take a deep breath without the support of life and enjoy the independence that Scala gives.

+1
source

Source: https://habr.com/ru/post/1207293/


All Articles