36 Replies Last post: Nov 18, 2011 2:27 PM by Tuomas Huhtanen  
Oleksii Iepishkin Novice 135 posts since
Aug 21, 2002
Currently Being Moderated

Sep 20, 2011 1:37 AM

FSC works in the latest build!

It makes my compilation x4 faster! Was 20sec and now only 5sec!

 

FSC icon in the status bar

Screen Shot 2011-09-19 at 4.52.21 PM.png

 

Project structure

Screen Shot 2011-09-19 at 4.50.19 PM.png

 

Settings

Screen Shot 2011-09-19 at 4.51.11 PM.png

Andreas Joseph Krogh Newbie 36 posts since
Jul 12, 2005
Currently Being Moderated
Sep 20, 2011 12:59 PM in response to: Oleksii Iepishkin
Re: FSC works in the latest build!

Smooth!

It should be possible to configure a global "Use FSC" so one doesn't have to loop thru all your modules enabling it for each one.

Piotr Kolaczkowski Newbie 27 posts since
Jul 11, 2009
Currently Being Moderated
Sep 20, 2011 5:13 PM in response to: Andreas Joseph Krogh
Re: FSC works in the latest build!

Excellent!

 

However, I noticed that for the SBT 0.7 generated IDEA project, if I set the "project" module to use FSC, FSC is restarted on every rebuild.

Setting "project" to the standard Scala compiler (2.7) and the rest of the modules to FSC (2.9.1) fixed the problem.

 

The compilation is faster, especially if only parts of the project need rebuilding.

Alex Cruise Newbie 20 posts since
Dec 23, 2003
Currently Being Moderated
Sep 21, 2011 9:20 PM in response to: Oleksii Iepishkin
Re: FSC works in the latest build!

I tried enabling FSC for my fairly large multi-module Maven project, and once again I get the dreaded "Compiler internal error. Process terminated with exit code 1".

 

idea.log is useless:

 

2011-09-21 10:20:53,411 [  34830]   INFO - ij.compiler.impl.CompileDriver - COMPILATION STARTED

2011-09-21 10:20:53,574 [  34993]   INFO - lij.compiler.impl.CompilerUtil - Initial VFS refresh took 112 ms: 0 min 0sec

2011-09-21 10:20:58,747 [  40166]   INFO - lij.compiler.impl.CompilerUtil -     COMPILATION FINISHED; Errors: 1; warnings: 0 took 5336 ms: 0 min 5sec

Piotr Kolaczkowski Newbie 27 posts since
Jul 11, 2009
Currently Being Moderated
Sep 21, 2011 9:31 PM in response to: Alex Cruise
Re: FSC works in the latest build!

Oh! I also got that today. Cleaning caches / restart / complete rebuild didn't help. Installing build 1407 finally helped, and so far no error.

Alex Cruise Newbie 20 posts since
Dec 23, 2003
Currently Being Moderated
Sep 21, 2011 9:38 PM in response to: Piotr Kolaczkowski
Re: FSC works in the latest build!

I'm on 1407 already... This is a pretty old symptom, I've been seeing it for years but never managed to pin down a common cause.

Piotr Kolaczkowski Newbie 27 posts since
Jul 11, 2009
Currently Being Moderated
Sep 22, 2011 10:38 AM in response to: Alex Cruise
Re: FSC works in the latest build!

FSC is probably also not the culprit, because when I switched back to "standard Scala compiler", the error still appeared. Strange.

Dennis  Haupt Apprentice 715 posts since
Jan 19, 2004
Currently Being Moderated
Sep 27, 2011 11:32 PM in response to: Oleksii Iepishkin
Re: FSC works in the latest build!

not working for me:

 

Information:Compilation completed with 4 errors and 0 warnings
Information:4 errors
Information:0 warnings
Error: error while loading package, class file 'S:\tools\scala builds\scala-2.9.1.final\lib\scala-library.jar(scala/package.class)' is broken
Error:(class java.lang.NullPointerException)
Error: error while loading Class, class file 'S:\Program Files\Java\jdk1.6.0_20\jre\lib\rt.jar(java/lang/Class.class)' is broken
Error:

 

any ideas?

Pavel Fatin JetBrains 256 posts since
Nov 12, 2009
Currently Being Moderated
Sep 29, 2011 2:26 PM in response to: Dennis Haupt
Re: FSC works in the latest build!

Please, ensure there's no Scala compiler / library versions conflict, then run Rebuild.

Dennis  Haupt Apprentice 715 posts since
Jan 19, 2004
Currently Being Moderated
Sep 29, 2011 8:28 PM in response to: Pavel Fatin
Re: FSC works in the latest build!

set everything to 2.9.1 final, but i still get:

http://ea.jetbrains.com/browser/ea_reports/296974

Pavel Fatin JetBrains 256 posts since
Nov 12, 2009
Currently Being Moderated
Sep 30, 2011 12:10 PM in response to: Dennis Haupt
Re: FSC works in the latest build!

It is likely that you have an empty "Project SDK" (I've just added a proper validation).

Dennis  Haupt Apprentice 715 posts since
Jan 19, 2004
Currently Being Moderated
Oct 2, 2011 12:58 PM in response to: Pavel Fatin
Re: FSC works in the latest build!

still not working, i'm back at the original NPE without stacktrace (used 2.9.1 everywhere). it doesn't seem to matter which jdk is set in the project settings. is there a log that i could switch on which tells me more?

Dirk Rademann Newbie 4 posts since
Dec 9, 2010
Currently Being Moderated
Oct 7, 2011 5:43 PM in response to: Dennis Haupt
Re: FSC works in the latest build!

HamsterofDeath schrieb:

 

not working for me:

 

Information:Compilation completed with 4 errors and 0 warnings
Information:4 errors
Information:0 warnings
Error: error while loading package, class file 'S:\tools\scala builds\scala-2.9.1.final\lib\scala-library.jar(scala/package.class)' is broken
Error:(class java.lang.NullPointerException)
Error: error while loading Class, class file 'S:\Program Files\Java\jdk1.6.0_20\jre\lib\rt.jar(java/lang/Class.class)' is broken
Error:

 

any ideas?

 

I'm getting exactly the same error and I've no idea what it could be. Maybe a problem specific to version 2.9.1? The examples all seem to be based on 2.9.0.1. I'm using JDK 1.7, but seems to make no difference as Hamster is using 1.6.

Dennis  Haupt Apprentice 715 posts since
Jan 19, 2004
Currently Being Moderated
Oct 7, 2011 7:44 PM in response to: Dirk Rademann
Re: FSC works in the latest build!

i tried both 1.6 and 1.7 and different scala versions - same error everywhere

Pavel Fatin JetBrains 256 posts since
Nov 12, 2009
Currently Being Moderated
Oct 5, 2011 6:48 PM in response to: Oleksii Iepishkin
Re: FSC works in the latest build!

You may check Real FSC support blog post.

Dennis  Haupt Apprentice 715 posts since
Jan 19, 2004
Currently Being Moderated
Oct 6, 2011 1:27 AM in response to: Pavel Fatin
Re: FSC works in the latest build!

i'm getting the NPE, no matter what i do. anything i can do to get more information?

Pavel Fatin JetBrains 256 posts since
Nov 12, 2009
Currently Being Moderated
Oct 8, 2011 10:56 AM in response to: Dennis Haupt
Re: FSC works in the latest build!

I'm unable to reproduce the problem, sorry. Is there a sure way to do it (a demo project or a sequence of steps)?

Dirk Rademann Newbie 4 posts since
Dec 9, 2010
Currently Being Moderated
Oct 8, 2011 2:21 PM in response to: Pavel Fatin
Re: FSC works in the latest build!

I just created a project from scratch with default options selected. I let the IDE create the global compiler library based on my Scala 2.9.1 home directory, enable FSC. But same error. I'm using a 64-bit JDK, could that be the problem?

Piotr Kolaczkowski Newbie 27 posts since
Jul 11, 2009
Currently Being Moderated
Oct 10, 2011 2:27 PM in response to: Dirk Rademann
Re: FSC works in the latest build!

I'm using 64 bit JDK, Scala 2.9.1 and both on Kubuntu 11.04 and Windows 7 I had no problems with FSC.

Nick D'Arcy Novice 175 posts since
Dec 22, 2006
Currently Being Moderated
Oct 19, 2011 8:11 PM in response to: Pavel Fatin
Re: FSC works in the latest build!

I really like the internal fsc, but I don't need to be notified everytime it starts and stops

 

http://i.imgur.com/rXUyx.png

 

Please remove!

 

Thanks, Nick.

Alexander Podkhalyuzin JetBrains 1,101 posts since
Jun 7, 2008
Currently Being Moderated
Oct 20, 2011 11:56 AM in response to: Nick D'Arcy
Re: FSC works in the latest build!

You are right, I created ticket about it: http://youtrack.jetbrains.net/issue/SCL-3715

 

Best regards,

Alexander Podkhalyuzin.

Andrew R Newbie 4 posts since
Oct 12, 2011
Currently Being Moderated
Oct 12, 2011 3:05 AM in response to: Oleksii Iepishkin
Re: FSC works in the latest build!

I’m finding it impossible to get rid of the “Compiler internal error. Process terminated with exit code 1″ error. Non-fsc compile works fine. idea.log has nothing useful in it. I’m on IntelliJ 10.5.2 with Scala plugin 0.4.1440. My project appears to be identically configured to that of a coworker who is using fsc just fine. I’m on Windows, he’s on OSX.

 

There is nothing on the net that offers any answers. I see a lot of you are using Scala 2.9, but it works fine on my coworkers computer with Scala 2.8.1.

 

Any thoughts?

Dennis  Haupt Apprentice 715 posts since
Jan 19, 2004
Currently Being Moderated
Oct 12, 2011 8:55 AM in response to: Andrew R
Re: FSC works in the latest build!

i can try to reproduce the problem using a virtual machine (oracle virtualbox) and upload that whole thing. that might help, right?

Andrew R Newbie 4 posts since
Oct 12, 2011
Currently Being Moderated
Oct 12, 2011 9:24 PM in response to: Dennis Haupt
Re: FSC works in the latest build!

Yes, that would help.

 

I will also try to repro with a fresh install in a virtual machine. At this point I've tried a billion variations of options and can't get it to work on my dev machine, so a fresh virtual machine would be a good approach.

Dennis  Haupt Apprentice 715 posts since
Jan 19, 2004
Currently Being Moderated
Oct 12, 2011 10:48 PM in response to: Andrew R
Re: FSC works in the latest build!

just a random thing before i go all out: do all people with the mysterious problem have a whitespace in their project path, and those who don't don't?

that seems to be it for me...

Andrew R Newbie 4 posts since
Oct 12, 2011
Currently Being Moderated
Oct 12, 2011 11:21 PM in response to: Dennis Haupt
Re: FSC works in the latest build!

I do have whitespace in my path. I will remove the whitespace and report on whether or not it fixed the problem.

Dirk Rademann Newbie 4 posts since
Dec 9, 2010
Currently Being Moderated
Oct 12, 2011 11:29 PM in response to: Dennis Haupt
Re: FSC works in the latest build!

HamsterofDeath schrieb:

 

just a random thing before i go all out: do all people with the mysterious problem have a whitespace in their project path, and those who don't don't?

that seems to be it for me...

 

That's it. A darn whitespace ...

 

I created a test project in "TestProject", works. Renaming the folder to "Test Project", and voila, the dreaded error. It's the whitespace. I hope this can be fixed soon.

 

Thank you Hamster :-)

Andrew R Newbie 4 posts since
Oct 12, 2011
Currently Being Moderated
Oct 13, 2011 3:24 AM in response to: Dirk Rademann
Re: FSC works in the latest build!

I removed the whitespace, now it works! I'm excited, I finally get to use fsc

Pavel Fatin JetBrains 256 posts since
Nov 12, 2009
Currently Being Moderated
Oct 13, 2011 10:18 AM in response to: Dennis Haupt
Re: FSC works in the latest build!

Thank you very much for figuring it out! We'll fix the problem with whitespaces soon.

Pavel Fatin JetBrains 256 posts since
Nov 12, 2009
Currently Being Moderated
Oct 13, 2011 2:06 PM in response to: Oleksii Iepishkin
Re: FSC works in the latest build!

The problem is fixed.

Dennis  Haupt Apprentice 715 posts since
Jan 19, 2004
Currently Being Moderated
Oct 13, 2011 2:42 PM in response to: Pavel Fatin
Re: FSC works in the latest build!

once again, the community and jetbrains worked together 24/7/365 to provide everyone with the awesome experience of a fast scala compilation.

i'm going to spend the next 4 hours in my basement incrementally compiling stuff quickly.

Thomas Santana Newbie 22 posts since
Apr 10, 2010
Currently Being Moderated
Oct 14, 2011 5:30 AM in response to: Oleksii Iepishkin
Re: FSC works in the latest build!

I'm having mixed results with my Maven 2.9.1 projects. On a single module project I can start the FSC and get the compliation to work (really sweet). However on my larger project (with multiple modules, some in Scala, some in Java, some POM, and scala definition on the main POM), I can't start the compiler and get an every whenever at least one module uses FSC (internal):

 

Internal error (Plugin: org.intellij.scala): None.get

 

I have no white space on the path I'm running IDEA 10.5.2 with plugin 0.4.1461.

 

On the logs I see the following error:

 

java.util.NoSuchElementException: None.get
    at scala.None$.get(Option.scala:275)
    at scala.None$.get(Option.scala:273)
    at org.jetbrains.plugins.scala.components.CompileServerLauncher.readPort(CompileServerLauncher.scala:113)
    at org.jetbrains.plugins.scala.components.CompileServerLauncher.start(CompileServerLauncher.scala:53)
    at org.jetbrains.plugins.scala.components.CompileServerLauncher.init(CompileServerLauncher.scala:37)
    at org.jetbrains.plugins.scala.components.CompileServerManager$Start$.actionPerformed(CompileServerManager.scala:129)
    at com.intellij.ui.popup.PopupFactoryImpl$ActionPopupStep$1.run(PopupFactoryImpl.java:506)
    at com.intellij.openapi.wm.impl.FocusManagerImpl.a(FocusManagerImpl.java:509)
    at com.intellij.openapi.wm.impl.FocusManagerImpl.e(FocusManagerImpl.java:492)
    at com.intellij.openapi.wm.impl.FocusManagerImpl.d(FocusManagerImpl.java:476)
    at com.intellij.openapi.wm.impl.FocusManagerImpl.access$200(FocusManagerImpl.java:52)
    at com.intellij.openapi.wm.impl.FocusManagerImpl$1.runEdt(FocusManagerImpl.java:82)
    at com.intellij.openapi.util.EdtRunnable$1.run(EdtRunnable.java:25)
    at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:597)
    at com.intellij.ide.IdeEventQueue.e(IdeEventQueue.java:662)
    at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:515)
    at com.intellij.ide.IdeEventQueue.b(IdeEventQueue.java:411)
    at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:369)
    at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
2011-10-13 22:16:05,218 [36159890]  ERROR - com.intellij.ide.IdeEventQueue - IntelliJ IDEA 10.5.2  Build #IU-107.587
2011-10-13 22:16:05,218 [36159890]  ERROR - com.intellij.ide.IdeEventQueue - JDK: 1.6.0_22
2011-10-13 22:16:05,218 [36159890]  ERROR - com.intellij.ide.IdeEventQueue - VM: Java HotSpot(TM) Client VM
2011-10-13 22:16:05,218 [36159890]  ERROR - com.intellij.ide.IdeEventQueue - Vendor: Sun Microsystems Inc.
2011-10-13 22:16:05,218 [36159890]  ERROR - com.intellij.ide.IdeEventQueue - OS: Windows XP
2011-10-13 22:16:05,218 [36159890]  ERROR - com.intellij.ide.IdeEventQueue - Last Action: CompileDirty

Dirk Rademann Newbie 4 posts since
Dec 9, 2010
Currently Being Moderated
Oct 15, 2011 1:02 PM in response to: Thomas Santana
Re: FSC works in the latest build!

In between I got the same error as you, the None.get problem. Now it's gone after I finished setting up everything properly, so I don't know exactly "what" fixed it. But here is my configuration, mabye you can compare it with yours...

 

I have a project with 3 modules, two of them contain Scala code, one is pure Java.

 

The project (parent) pom.xml contains the following repositories:

 

  <repositories>
    <repository>
      <id>scala-tools.org</id>
      <name>Scala-tools Maven2 Repository</name>
      <url>http://scala-tools.org/repo-releases</url>
    </repository>
  </repositories>

  <pluginRepositories>
    <pluginRepository>
      <id>scala-tools.org</id>
      <name>Scala-tools Maven2 Repository</name>
      <url>http://scala-tools.org/repo-releases</url>
    </pluginRepository>
  </pluginRepositories>

  <build>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>2.3.2</version>
        <configuration>
          <source>1.7</source>
          <target>1.7</target>
        </configuration>
      </plugin>
    </plugins>
  </build>

 

The modules containing the Scala code:

 

  <dependencies>
    <dependency>
      <groupId>org.scala-lang</groupId>
      <artifactId>scala-library</artifactId>
      <version>2.9.1</version>
    </dependency>
  </dependencies>

  <build>
    <plugins>
      <plugin>
        <groupId>org.scala-tools</groupId>
        <artifactId>maven-scala-plugin</artifactId>
        <version>2.15.2</version>
        <executions>
          <execution>
            <goals>
              <goal>compile</goal>
              <goal>testCompile</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>

 

In the IDE in Settings > Compiler > Scala Compiler you should select the bundle Compiler library:

 

Maven: org.scala-lang:scala-compiler-bundle:2.9.1 (version 2.9.1.final)

 

Configured this way it works nicely for me.

 

Hope this helps.

Dirk

Thomas Santana Newbie 22 posts since
Apr 10, 2010
Currently Being Moderated
Oct 18, 2011 4:40 AM in response to: Dirk Rademann
Re: FSC works in the latest build!

My "apparent" configuration is the same, but I still fail to compile using FSC. All my modules have the scala facet (including the Parent which defines the scala versions).

 

I notices on the project's library list the scala-compiler-bundle is grayed. Don't know the meaning of this. I really don't get what is wrong. Is there any way to debug the FSC startup? When I click on the status bar icon and select Run nothing happens.

 

Thanks for any advice.

Thomas Santana Newbie 22 posts since
Apr 10, 2010
Currently Being Moderated
Nov 3, 2011 3:51 PM in response to: Thomas Santana
Re: FSC works in the latest build!

I managed to get it working. Apparently my FSC options where incorrect and the launch failed.

I created a new project from a repository clone and compared all .idea files. In the end it was a bad option on the command line for the internal fsc.

Sam Reid Newbie 48 posts since
Jan 15, 2009
Currently Being Moderated
Oct 14, 2011 9:01 PM in response to: Oleksii Iepishkin
Re: FSC works in the latest build!

I just tested out the new FSC support, and it looks like it's working great. IDEA 10.5.2 on Win7 x64.  Thanks!

 

Sam

Tuomas Huhtanen Newbie 60 posts since
Aug 27, 2002
Currently Being Moderated
Nov 18, 2011 2:27 PM in response to: Oleksii Iepishkin
Re: FSC works in the latest build!

There seems to be some problems with the fsc in nika builds (I'm using 110.187 and 0.5.129). The fsc fails in the incremental compiles, regardless that the code is correct. The full rebuild always works, but the after some changes, the problems start. The problems are always with same code snippets. One problematic place is calling a method that has default parameters.

 

For example:

 

def foo(bar: String, baz: String = "default")

 

then somewhere else:

foo("bar")  <--- Compiler says Not enough parameters

 

As a workaround passing the default argument explicitly makes fsc work.


Another problem appears when using some (but not all) implicit conversions. In incremental compile the fsc can't resolve the implicit conversion.

 

These problems are quite frequent, the cycle goes something like: full rebuild, code change, successfull incremental build, code change, failing incremental build, full rebuild.

The fsc was working just fine in idea 10.5.2

More Like This

  • Retrieving data ...