Which IDE for Scala 2.8? [closed]
Asked Answered
S

17

40

This is the same question for older version of Scala, but they say that Eclipse plugin has been improved vastly. Is it the best IDE now? How do different Scala IDE compare today?

Slew answered 10/4, 2010 at 22:13 Comment(3)
IDEA gets the best reviews, but I'm having a hell of a time trying to get it to work at all: #2668653Erebus
Same question from January 2010.Agriculture
Eclipse Scala IDE is now supported by Odersky's Scala Solutions, so Eclipse becoming more and more suitable for my expectations.! I prefer Eclipse.!Pridemore
P
26

I've been pretty successful with IDEA 9. I've briefly tried both Netbeans and Eclipse and wasn't able to get what I wanted. Eclipse's code-complete didn't behave as well as I'd have liked, and I couldn't find a way to make Netbeans handle Scala scripts; It'd just complain that the file wasn't a class.

To be clear, I've been using IDEA for a few years for Java, so keep that in mind:)

Penniepenniless answered 11/4, 2010 at 5:20 Comment(3)
Can you remember what you wanted and didn't get?Agriculture
@Łukasz -- In Netbeans, it didn't seem to be able to handle scala scripts, only classes. Eclipse's code complete and syntax highlighting were a bit flaky. Valid scala statements were being flagged as erroneous. Again, it's possible since I'm not exceptionally familiar with Netbeans or Eclipse, that I misconfigured something.Penniepenniless
I would currently recommend the combination of the latest IDEA 9.0.2 and one of the nightly builds of the Scala plugin which can be downloaded from here: confluence.jetbrains.net/display/SCA/… for example build #1289)Sabra
M
13

For the moment, Scala Plugin in IntelliJ IDEA is the best. It handles Scala 2.8 well. IntelliJ IDEA Community Edition is now free and open source (and works with Scala), so I can't see any reason for not using it.

The plugin is still somewhat buggy (many "false negatives", i.e. the code without red underscores may not compile successfully; but almost no "false positives"), but perfectly usable. The best thing is that you can use IDEA's excellent debugger with Scala (not without some issues, but it actually works!).

FSC (Fast Scala Compiler) is also supported in latest builds. A huge time-saver.

The plugin development team is quite responsive. Some of the guys work directly in JetBrains and possess intimate knowledge about IDEA platform, so the development progresses fast.

Moujik answered 11/4, 2010 at 20:15 Comment(0)
Y
8

JetBrains IDEA's Scala plug-in handles 2.7 and 2.8 equally well.

I cannot make any comparisons because I have used only IDEA.

Yahoo answered 11/4, 2010 at 1:1 Comment(0)
U
6

Using Eclipse Helios with the dev-version of the new Scala(2.8) plugin, as there isn't an official release yet. That is beta, definitively -- but I can't confirm the frequently expressed opinion that this plugin is outright horrible ;-)

I'd say, the experience is already OK-ish, and indeed better than the current state of affairs with the Groovy plugin. OTOH, the experience with plain Java is way more smooth (feels like flying at times), and the current CDT I'd rate somewhat in between.

Incremental compile and error highlighting work quite well for me; tweaking a DSL implementation into form just by continuously rewriting your code until the error markers are gone -- without ever having to test-run your program -- is outright fun and just again shows that FP / static typing rocks!

Problems encountered from time to time: - implicits and nested types in other compilation units (esp. nested / super packages) aren't picked up at times when there are still other errors around; they will be picked up after an full build - there seems to be a memory leak in the version I'm using right now (from end august 2010), necessitating to restart the workbench after some hours of work - beware when you're using AspectJ, to make sure you get a version of the Scala plugin which relies on a JDT weaving bundle version which also works with AJDT

PS: I'm using maven builds in all my projects and generated the eclipse projects with the eclipse-maven-plugin, and then imported them as plain-flat eclipse projects. I can just strongly recommend everyone to keep away from the M2-eclipse plugin (for maven) in its current (2010) state, it makes your workbench painfully slow, is buggy and has lots of almost unpredictable behaviour, because it constantly tries to do magic things behind the scenes (and besides that, the aspectj support is broken since this spring)

Untrimmed answered 10/9, 2010 at 22:12 Comment(0)
D
5

i use both eclipse and IDEA

  1. eclipse supports type detection is better than IDEA (it is very neccessery thing if you want program in functional style that you can be aware from type of expressions and variables.)


    Edit1: IDEA supports type detection like eclipse but you have to define a value in your functions for example: def testTs[A](a:List[String],b:List[A]) = for{ ai <- a bi <- b } yield (ai,bi) } should be converted to def testTs[A](a:List[String],b:List[A]):List[(String,A)]={ val result = for{ ai <- a bi <- b } yield (ai,bi) } also instead of hover your mouse over variables you must press ctrl+q when your mouse is hover on that variable

  2. eclipse have some problems in code completion (when you use a variable in next line and you want get a property of this variable eclipse show wrong code suggestions)
  3. in IDEA ruining a scala application is 5 sec slower than eclipse (there is some solution for bust IDEA run time but these have side effect have some problems) in idea there is a well known problem with double click speed that show itself in many cases like opening a file or selecting an string in source... you can increase double click time out by creating (or editing) /home/.Xresources and add this line: *.multiClickTime: 400

Edit1: in summery i prefer to use IDEA rather than eclipse

Distort answered 10/4, 2010 at 22:13 Comment(0)
W
4

My experiences clearly point to IntelliJ IDEA:

About six months ago, when I started a serious Scala (multi module) project, I had to abandon Eclipse as my favorite Java IDE and switched to IntelliJ (9.0.x). Eclipse Scala IDE was way to buggy and often stopped responding at some point, even for the most simple projects. For CI (Hudson) and command line build, I depend on Maven (with Scala plugin). The Maven dependencies (incl. Scala libs) are picked up nicely by IntelliJ.

A few days back I updated to IDEA X (CE) with the current plugin (nightly build) and work became even smoother. Although fsc still terminates after a while when inactive.

From what I see, I'd like to add, that there seems to be way more activity on the IntelliJ side to respond to bugs and improve the plugin continuously. Correct me when I'm wrong, but Eclipse Scala IDE development seems almost stalled. Still no 'official' Helios release!

NB: Just to provide some context (not bragging, really): The aforementioned project consists of about 25 Scala modules (POMs), 5 Java modules, 325 Scala files with a total of about 360 Scala classes, case classes and traits (> 19 kLOC, including comments). My platform is OS X 10.6, Scala 2.8.1, Java 1.6.

UPDATE: After having the need for pretty extensive refactorings (mainly move class, rename package), I discovered that the recent IDEA 10.0.1 plugin 0.4.413 (and probably older versions, too) has quite some problems getting stuff right. I don't want to explain the specifics, but I (almost ever) ended up manually fixing unresolved references or otherwise messed-up code. You can have a look at http://youtrack.jetbrains.net to get an idea.

For everyone who is really considering doing some serious development with Scala, I strongly recommend to evaluate the IDEs in question beyond the basics. When you are into an agile approach, which in my option requires a painless refactoring support without surprises (especially in multi-module projects), things are pretty tight at the moment.

It would be pretty neat, if someone came up with a IDE independent specification-like list of refactorings (and desired outcomes), which could be used to verify an IDE's refactoring support.

Wean answered 14/12, 2010 at 14:40 Comment(1)
This is, I think, something close to the list you're asking for: refactoring.com/catalog/index.htmlSubaxillary
M
4

A non-answer: None.

Based on what a perceived majority says, IDEA is probably the best Scala IDE today. And it (read: the Scala plugin) sucks. It does not handle fsc well, type inference is a mess, many errors are not shown, a number of non-errors are marked as errors, it is slow (when inspections are turned on), the test runner silently swallows aborting (!= failing) tests, ...

So I switched to a simple text editor with syntax highlighting on one and a maximized shell with SBT (simple build tool) on the other screen. Awesome! SBT is responsive (you can let file changes trigger recompilation of affected code and even reruns of tests), manages dependencies very smoothly and has helpful output (esp for tests; using ScalaTest). SBT increased my productivity compared to IDEA a lot.

You lose code completion, of course, altough geany offers me identified symbols. But as long as IDEs don't get type inference to work properly code completion does not help, anyway.

Some people care a lot about code refactoring. Well, the IDEs apparently don't make a good job there either. Even if they would, I'd rather only open them for this particular task than use them all the time.

Mushy answered 25/1, 2011 at 21:1 Comment(1)
There's a plugin for SBT and IDEA, actually two of them. I made a modified version that injects errors into the documents, you can see the code here: github.com/null77/idea-sbt-pluginEpanorthosis
S
4

I think that the best option so far is the ScalaIDE for Eclipse. You can go to the ScalaIDE Web Site and look around to see by yourself. http://scala-ide.org/

Strong points I see about it are:

  • documentation,
  • tutorials,
  • constant releases,
  • support from Typesafe.

Here below a summary of the main features:

Scala IDE provides support for development of Scala applications in the Eclipse platform. Its main target is the support for the Scala language and the integration with the Eclipse Java tools. It provides many of the features Eclipse users have come to expect including:

  • Support for mixed Scala/Java projects and any combination of Scala/Java project dependencies. Type driven operations are transparent across Scala and Java files and projects, allowing straightforward references from Scala to Java and vice versa.
  • A Scala editor with syntax highlighting, inferred type, hyperlinking to definitions, code completion, error and warning markers, indentation, brace matching.
  • Project and source navigation including Scala support in the Package explorer view with embedded outline, outline view, quick outline, open type, open type hierarchy.
  • Incremental compilation, application launching with integrated debugger, hyperlinking from stack traces to Scala source, interactive console.
  • Support for Eclipse plug-in and OSGi development including hyperlinking to Scala source from plugin.xml and manifest files.

UPDATE: the features and advantages are mentioned on this answer are for version 2.9 and 2.10 of Scala, because it has been already discontinued. see here:

"The 2.0.1 release is only available for Scala 2.9, if you would like to use the Scala IDE with Scala 2.8, please install the 2.0.0 release (support for Scala 2.8 has been discontinued after the 2.0.0 version)"

Solander answered 24/5, 2012 at 22:10 Comment(0)
I
3

The officially endorsed and supported (by Typesafe) for Scala 2.9 is Eclipse. The current version is far superior to prior versions and includes a context-aware REPL, full-featured debugger, and even the ability to debug REPL statements. I think this question needs to be updated and the answers revisited.

Immodest answered 24/5, 2012 at 21:52 Comment(0)
B
2

I don't recommend the Scala IDE/Eclipse. It doesn't have a lot of the features that are even available for Eclipse with Java. And there are bugs.

Babby answered 19/5, 2010 at 17:20 Comment(0)
B
2

I am using the latest NetBeans and haven't tried anything else. I've met at least 2 notable bugs in NetBeans while coding in Scala:

One: NB occasionally come unable to run a program, hanging on classpath scanning.
Solution: Create a new project, copy your code there and go on.
Comment: This bug is more than 10 years old.

Two: Sometimes NB can't see members of particular namespaces or classes and complains when you use them.
Solution: Just ignore and go on - compiler founds no errors and the program works.

Bract answered 4/9, 2010 at 20:55 Comment(1)
For #2, I think this might work: right click on any .scala file in editor and select "reset scala parser", then go to any other .scala file, click anywhere inside the window and go back to your original window. This should be fixed.Behring
N
1

I'd recommend IDEA's plugin for now.

The Scala plugin for NetBeans is quite nice too. It doesn't yet support NetBeans 6.9, the newest release, though, and you still need to download it manually instead of installing it directly from the plugin manager inside NetBeans.

However, it integrates better with Maven projects than IDEA's plugin does (this is true for NB and IDEA in general, in my opinion).

Navigator answered 18/6, 2010 at 16:34 Comment(0)
G
1

It partly depends on your style of working, as all the options have strengths and weaknesses.

If you need refactoring across mixed java/scala projects, then IntelliJ is your only option.

If you want to do any work on the compiler or a compiler plugin, then Eclipse has the advantage of being able to launch a runtime workspace with a custom compiler build, including breakpoints. It also improved massively for the 2.8 Scala release.

Netbeans is a fine choice to go with if you're already very familiar with that platform, the costs of learning a new environment may well outweigh any benefits, and all three solutions are improving rapidly.

Gettings answered 15/9, 2010 at 1:50 Comment(0)
H
1

I haven't tried netbeans scala plugin yet, but I find that Intellij IDEA plugin is at any way much better a scala ide than the Scala eclipse plugin, which is sooooo slow that drives me crazy. Though swing applications don't work well with my tiling window manager.

Hoenir answered 8/12, 2010 at 2:12 Comment(0)
L
1

try IDEAX the latest community edition of Intellij IDEA (version 10), it has improved scala plugin which has faster code compilation and exceution in addition to that it has Maven3 and SBT support with which we can develop Lift applications.

Loreleilorelie answered 10/12, 2010 at 13:30 Comment(0)
F
1

IntelliJ IDEA community edition + Scala Plugin + SBT plugin

Fenske answered 14/2, 2011 at 5:48 Comment(0)
A
0

For recent versions (2021) the question which ide takes a big portion of the home page https://scala-lang.org/

Alfreda answered 15/2, 2021 at 19:41 Comment(1)
Home pages change. Links go stale. For this answer to remain relevant and useful you should copy the some of the pertinent link text in to the answer text.Maxa

© 2022 - 2024 — McMap. All rights reserved.