Question

Is the current Scala Eclipse plugin (http://www.scala-lang.org/node/94) usable? I keep reading that its unstable and buggy, even unusable.

See previous thread: What is the current state of tooling for Scala?

I've tried it out briefly but only for trivial programs, so far it seems fine.

Thanks!

UPDATE: I'm going to dive in and get some stuff done with Scala and Eclipse, I'll try to report back and let you know what I find.

UPDATE: See my answer below about my experiences with Eclipse 3.5.1 and Scala 2.7.7 Final.

  • Alex
Was it helpful?

Solution

It works pretty well for me, but I'm looking forward to 2.8.0. There's a nice set of slides (pdf) outlining the very significant changes coming.

OTHER TIPS

I found it completely unusable. Syntax highlighting worked, but that was about it. JUnit couldn't find any tests written in Scala. The debugger couldn't find sources and threw up weird error messages after every step. I've also heard of people running into trouble with auto-completion and even cut-and-paste. Apparently it can slow down work with regular Java, too. This was with Scala 2.7.5 on Eclipse 3.5 in late July, so pretty recent.

It felt to me like whoever wrote the Eclipse plug-in just got it to compile and didn't try it out even once before shipping it. It sounds like it works well enough for some people though. Personally, I switched to Emacs/Ant and haven't really looked back.

I've been writing code in Scala using Eclipse now for just over a week, and my conclusion is that it does work, but is not production ready.

Background on my setup:

  • Scala 2.7.7 final
  • Eclipse for Java Developers, 3.5.1
  • Ubuntu Desktop 9.04 x64
  • Maven 2.2.1
  • JUnit 4.7

I created a brand new project which I am using just Scala in, no Java:

  • Created the project, using maven, referencing the scala-archetype-simple
  • I generated an eclipse project for it using "mvn eclipse:eclipse"
  • I then opened it in Eclipse

Here are some of the problems I face:

  • I lose syntax highlighting all the time... closing and reopening the file helps
  • Often, out of now where I get tons of compile errors, cannot find my classes, doing a CLEAN in eclipse solves this
  • Eclipse crashes hard sometimes, requires me to kill -9 the java process, then start Eclipse again, see it complain about the workspace, then start it again
  • I'm writing vanilla JUnit tests, and have a lot of trouble running them, most of the time Eclipse can't find them, restarting Eclipse and then opening each test file usually resolves this temporarily, the error I often get is No tests found with test runner 'JUnit 4'
  • Lots of erroneous squigles appear under lines of code, they can be ignored it seems
  • Intellisense works maybe 10% of the time, cleaning and/or reopening files seems to bring it back temporarily
  • Sometimes I lose the ability to type in the text editor in Eclipse, if I fiddle enough it might come back, or I just close and re-open the file
  • Sometimes basic things like highlighting and deleting a line of code fail, with errors like "Delete" did not complete normally. Please see the log for more information.

So I push through all these issues, and the end result is that I restart Eclipse many times a day, and constantly close and re-open files in Eclipse, and clean often.

It got better in 2.7.4. It'll get substantially better in 2.8.0 (it's co-released with Scala itself).

It's not on the level of Java tooling, but it is constantly improving.

I can confirm that as of Scala 2.8.0.RC6, the Scala Eclipse plugin as of June 27 2010 does work fairly well.

What works:

  • Syntax highlighting
  • Some autocompletion
  • Find definitions (Ctrl+Click to navigate)
  • Building and syntax error highlighting

What doesn't work:

  • Refactoring.
  • Editor is very slow. Even switching between tabs takes up to 4 seconds.

That's just from using it for a few days though.

That said, I'm getting real work done, and with the Eclipse web tools added in for HTML, CSS, Javascript, and XML, it's a nice way to develop Lift 2.0 web applications.

As of July 2012, the plugin is in great shape and is extremely useful.

May 24, 2010 I have eclipse 3.5 and latest Scala plugin, scala 2.8.0 RC2 Still the same issues: no correct highlighting, i'm not talking about autocompletiong and stuff... I have JDT plugin enabled - if it matters...

It's a shame that for such an interesting language as Scala which is already so many years around there is still no good dev environment...

Totally unusable with Eclipse Indigo for J2EE and Scala IDE plugin 2.9.1.

Eclipse too slow, and even crashing. When it doesn't crash, it loses compilation links and doesn't stop warning me about class not found. I have to clean and recompile all projects.

I uninstalled it waiting for another solution or a better version.

If it works for you then keep using it :) I have had odd cursor problems that I don't have when doing straight java. Usually closing the editor window and reopening solves the problem.

I've tried interop (one project with mixed Java and Scala) and I was having problems so I abandoned it. I really, really want this work... Anyway, I think my problems due to the fact that I was trying to build an RCP plugin versus a simple headless Java application. The Scala Nature seemed to not invoke the Java compiler in every case. I'd see a bunch of red lights that weren't real, because my problems view didn't show anything and the .class files were correct.

I'm really looking forward to the IDE with the 2.8 release.

I'm using Scala-IDE version 2.0.0-v2_09, Eclipse Indigo, Scala 2.9.1.

Sometime when I use auto completion such as:

//expected BufferedInputStream
BufferedInpu

Then I hit Ctrl-Space, select java.io.BufferedInputStream, then my import section loses some lines, and:

object PingPong extends Application {
  ...

turns into:

object PingPong
  ...

I have found my solution to avoid that is type full name of BufferedInputStream, then Ctrl-Shift-O :-)

Or sometime it warns me these:

Multiple markers at this line
        - object io is not a member of package 
        main.scala.pingpong.zip.java
        //repeats 15 times

with my imports:

import java.util.zip.ZipOutputStream
import java.io.BufferedInputStream
import java.io.BufferedOutputStream
import java.io.FileInputStream
import java.io.FileOutputStream
import java.util.zip.ZipEntry
import java.io.File
import java.io.ByteArrayOutputStream

I used to raise a terminal, code in Eclipse, then switch to terminal:

sbt compile
sbt run

:-)

Eclipse seems does not support for selecting builder if you have multiple ones. It always chooses the first one listed.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top