What is the current state of the Scala Eclipse plugin? [closed]
Asked Answered
T

11

17

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
Tshirt answered 4/10, 2009 at 23:1 Comment(1)
Note that this question talks about ancient releases. The current release is 2.9.2, and 2.10 (trunk) is very usable. (As of July 2012)Croquet
U
16

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.

Unscramble answered 5/10, 2009 at 3:54 Comment(2)
Do you know if there is an ETA on 2.8.0?Tshirt
Thanks Rich, grabbing all the documentation I can on lift and scala (I use the eclipse plugin at home)Dreamy
M
8

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.

Manns answered 5/10, 2009 at 4:37 Comment(5)
I hade the same kind of experience; even syntax highlighting sometimes doesn't work and I get strange exceptions in the Eclipse log. I switched to NetBeans 6.7 and the Scala plug-in that's available for it, but that is also very basic and contains bugs (although it works better than the Eclipse plug-in for me). I hope it gets better with Scala 2.8, I'll try it again when it comes out.Bazan
hey Jay, with Emacs/Ant, can you debug?Tshirt
@Bazan Surprisingly the Netbeans plug-in was even worse for me. I couldn't even create a new project without getting some weird error message. Hopefully the 2.8 upgrade will improve IDE support. The other 2.8 improvements are very nice.Manns
@Alex Black Kind of, but debugging is primitive. You have to make sure to pass -g:vars to scalac or fsc to get line number and variable information included in the generated class files. After that, you can use "M-x jdb" to invoke the debugger. On my Emacs, it won't display the current position in the source buffer, but the debugger prints the line it's on, and you can query the values of variables. jdb is definitely not as nice as a graphical debugger, but it works for the most part.Manns
I had a similar problem with the Netbeans plugin, even setting it up was terrible. I use the Eclipse plugin, but mostly as an editor. Using Maven to build my projects for the GAE. Built a generic empty template for GAE friendly lift code. If anyone needs it I can link to itDreamy
T
7

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.

Tshirt answered 5/11, 2009 at 15:11 Comment(5)
Same experience here. I've switched to using the 2.8 nightlies, which are marginally better, but I can't get the debugger to work at all.Beverie
Correction: I can debug, it's just that breakpoints in the default package don't seem to be not honoured (raised bug here: bit.ly/4u2KVB ). The debugger is clearly in its infancy though: stepping behaviour is odd and variable values are not displayed.Beverie
How are the 2.8 nightlies looking these days?Tshirt
Cannot agree more. Have tried Scala 2.9 with Eclipse Juno for some weeks, and as November 2012 the plugin is still very promising but not yet production ready. Among other things, code completion issues can make you mad sometimes.Pneumonic
Juno is pretty bleeding edge as far as the scala plugin is concerned. Works great with Indigo.Croquet
W
4

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.

Wandis answered 5/10, 2009 at 3:45 Comment(0)
F
3

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.

Ferriage answered 27/6, 2010 at 8:36 Comment(2)
about the sluggishness, have you tried increasing jvm memory in eclipse.ini? i increased it and since then files open up instantly (i'm on Ubuntu). it was unmanageable before. that said, scala ide for eclipse is still far from the quality/stability provided by for instance the Java support in Eclipse.Epicycloid
The 4s pauses actually went away when I updated the plugin about a week ago, which was very gratifying. Yes, I have had to increase the IDE's memory: I get out of memory errors while browsing classes otherwise (this is Mac OS X 10.6 64-bit JVM). It's true that the Scala IDE isn't at the same level of maturity as the Java one, but that's a very high bar. As far as I'm concerned it's now good enough for real projects.Ferriage
C
3

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

Croquet answered 14/7, 2012 at 19:21 Comment(0)
A
2

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...

Amain answered 24/5, 2010 at 22:1 Comment(0)
H
1

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.

Hatchment answered 28/11, 2011 at 10:23 Comment(0)
S
0

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.

Straightout answered 5/10, 2009 at 2:3 Comment(1)
It worked for HelloWorld.. :) But if I knew it would stop working on a bigger project I'd prefer to not invest the time just to learn that for myself.Tshirt
E
0

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.

Equities answered 8/10, 2009 at 20:38 Comment(0)
I
0

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.

Illegible answered 11/1, 2012 at 18:45 Comment(1)
At the same time, Scala plugin for NetBeans seems to be forgotten.Illegible

© 2022 - 2024 — McMap. All rights reserved.