tags:

views:

2702

answers:

8

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: http://stackoverflow.com/questions/796258/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
A: 

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.

Peter Recore
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.
Alex Black
+3  A: 

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.

Jorge Ortiz
+15  A: 

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.

Scott Morrison
+1 for the reference
Rich Seller
Do you know if there is an ETA on 2.8.0?
Alex Black
Thanks Rich, grabbing all the documentation I can on lift and scala (I use the eclipse plugin at home)
Mark Essel
+5  A: 

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.

Jay Conrod
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.
Jesper
hey Jay, with Emacs/Ant, can you debug?
Alex Black
@Jesper 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.
Jay Conrod
@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.
Jay Conrod
@Jay: Thanks for the info.
Alex Black
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 it
Mark Essel
A: 

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.

arcticpenguin
+5  A: 

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.

Alex Black
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.
rewbs
Correction: I can debug, it's just that breakpoints in the default package don't seem to be not honoured (raised bug here: http://bit.ly/4u2KVB ). The debugger is clearly in its infancy though: stepping behaviour is odd and variable values are not displayed.
rewbs
How are the 2.8 nightlies looking these days?
Alex Black
+1  A: 

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

Eugene Sajine
+2  A: 

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.

Matthew Phillips
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.
Stefan De Boey
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.
Matthew Phillips