Which IDE for Scala 2.8?

前端 未结 16 1120
我在风中等你
我在风中等你 2020-12-02 17:19

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 t

相关标签:
16条回答
  • 2020-12-02 17:29

    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:)

    0 讨论(0)
  • 2020-12-02 17:31

    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.

    0 讨论(0)
  • 2020-12-02 17:36

    IntelliJ IDEA community edition + Scala Plugin + SBT plugin

    0 讨论(0)
  • 2020-12-02 17:40

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

    0 讨论(0)
  • 2020-12-02 17:41

    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.

    0 讨论(0)
  • 2020-12-02 17:41

    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.

    0 讨论(0)
提交回复
热议问题