Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the purpose of `scala-2.11` folder in IntelliJ IDEA

scala-2.11 folder appeared after recent update of IDEA and Scala plugin.
What should it be used for?

like image 440
Denis Mikhaylov Avatar asked Apr 04 '15 09:04

Denis Mikhaylov


People also ask

What is Scala plugin in IntelliJ?

The Scala plugin extends IntelliJ IDEA's toolset with support for Scala, SBT, Scala. js, Hocon, and Play Framework. Support for Scala, SBT and Hocon is available for free in IntelliJ IDEA Community Edition, while support for Play Framework and Scala. js is available only in IntelliJ IDEA Ultimate.

Where is Scala installed by IntelliJ?

To install Scala plugin, press Ctrl+Alt+S , open the Plugins page, browse repositories to locate the Scala plugin, click Install and restart IntelliJ IDEA. Now you can successfully check out from VCS, create, or import Scala projects.

How do I select Scala version in IntelliJ?

Press Ctrl+Alt+S to open Settings/Preferences dialog. From the options on the left, select Build, Execution, Deployment | Compiler | Scala | Scala Compiler Server.

Can you run Scala in IntelliJ?

Run Scala applicationsYou can run your Scala code through IntelliJ IDEA, use sbt shell, or use Scala worksheet for a quick code evaluation.


1 Answers

Usually such directories are used for binary version-dependent code. For example, macros in 2.10 are not source-compatible with macros in 2.11, so if you're building your project for different binary versions and you're using macros, it makes sense to put code which is only valid for the specific version in different source roots. SBT then will use the appropriate directory when compiling for 2.10 or 2.11.

If you're using SBT, though, you would need to set such thing up manually in the build definition. If you're not using SBT, then probably IDEA plugin was updated to handle such things by itself.

like image 198
Vladimir Matveev Avatar answered Sep 18 '22 23:09

Vladimir Matveev