13 Replies Last post: Jul 2, 2013 7:24 PM by Pavel Fatin  
Oleksii Iepishkin Novice 135 posts since
Aug 21, 2002
Currently Being Moderated

Dec 20, 2012 3:36 AM

How to configure external build with scala

I was able to configure External Build with scala plugin (v.0.7.41). Here are my steps:

 

1. Open Settings -> Compiler and select "Use external build". Close the dialog

Screen Shot 2012-12-19 at 6.24.53 PM.png

 

2. Open Project Structure -> Global Libraries and create a library with scala-library.jar and scala-compiler.jar files. Right now scala plugin has these names hardcoded and will fail if you use different names.

Screen Shot 2012-12-19 at 6.23.51 PM.png

 

3. Open Project Structure -> Facets and in every scala facet select the library created in step #2 as Compiler Library.

Screen Shot 2012-12-19 at 6.26.17 PM.png

 

4. Stop FSC if you have it running. There is and icon in the status bar. Click and select Stop.

Screen Shot 2012-12-19 at 6.28.14 PM.png

5. Build -> Make

Barry Kaplan Novice 320 posts since
Sep 28, 2006
Currently Being Moderated
Dec 20, 2012 9:26 PM in response to: Oleksii Iepishkin
Re: How to configure external build with scala

Not for me. When I try to compile anything I get Unknown source file errors. eg:

 

: Error: Unknown source file: /mnt/ssd/si/vimana.dev/servers/si-infra/src/main/scala/com/mongodb/ErrorInterceptingDB.scala

java.lang.RuntimeException: Unknown source file: /mnt/ssd/si/vimana.dev/servers/si-infra/src/main/scala/com/mongodb/ErrorInterceptingDB.scala

 

Barry Kaplan Novice 320 posts since
Sep 28, 2006
Currently Being Moderated
Dec 21, 2012 12:04 AM in response to: Oleksii Iepishkin
Re: How to configure external build with scala

No, its my SSD. Its internal. However the directory containing the idea project is soft linked to the SSD (on lunix).

Pavel Fatin JetBrains 274 posts since
Nov 12, 2009
Currently Being Moderated
Dec 24, 2012 11:07 PM in response to: Barry Kaplan
Re: How to configure external build with scala

The problem with links is fixed in the latest plugin builds.

Alexander Podkhalyuzin JetBrains 1,176 posts since
Jun 7, 2008
Currently Being Moderated
Dec 25, 2012 10:48 AM in response to: Oleksii Iepishkin
Re: How to configure external build with scala

Probably you are using "compile independent modules in parallel" option?

 

Best regards,

Alexander Podkhalyuzin.

Stefan Endrullis Newbie 36 posts since
Nov 2, 2006
Currently Being Moderated
Jul 2, 2013 2:24 PM in response to: Oleksii Iepishkin
Re: How to configure external build with scala

I have a single module proejct consisting of Scala and some Java files and I discovered the same. FSC seems to be much faster than the new compiler system (around factor 2-3), especially when you have only minor changes in your code. To get sure about this I made a small test. I compiled by project with both compilers. Here are the results:

 

Cold run:

FSC: 3:15

New compiler: 3:35

 

Warm run when only a single line of code has changed (the for test I used exactly the same line of code and made the same change):

FSC: 8s

New compiler: 21s

 

I don't really care about the cold run, since I do it only once in a month.  But what I care about are warm runs, because they are executed more than 100 times a day and they majorly influence the time to test and debug code.

Is this difference between FSC and the new compiler supposed to be?

Did I have to set certain compiler options to increase the speed?

I already set the same parameters for both compilers (Xmx, max heap size) but it didn't change anything.

The option "Run compiler server (in external build mode)" is checked.  Does this mean IDEA uses nailgun to compile the project?

Pavel Fatin JetBrains 274 posts since
Nov 12, 2009
Currently Being Moderated
Jul 2, 2013 7:24 PM in response to: Stefan Endrullis
Re: How to configure external build with scala

Hi Stefan, we'll check that soon.

Pavel Fatin JetBrains 274 posts since
Nov 12, 2009

More Like This

  • Retrieving data ...