<tldr>
1. Eclipse is still less polished & less reliable than Intellij for
Scala development.
2. SBT support for project->project dependencies is still clumsy.
3. sbt-idea is currently a bit broken, it needs to focus on emitting
Intellij Module descriptors, not Project descriptors.
</tldr>
I use both Eclipse and Intellij as IDEs for Scala development. I tend
to flip back and forth, unable to get completely comfortable with
either.
I've got an understanding for how Eclipse works, accumulated over many
years of usage, so that would be my preference if they were otherwise
equal. But I find it noticeably more buggy than the Scala support in
Intellij. Eclipse bug examples include the unreliable refactoring
tools, spurious compiler errors, and the close-curly-brace auto-insert
"anti-feature".
I always run SBT in the background alongside the IDE, for the maven
dependency managements, as well for second opinions on compiler
errors. So this requires using sbteclipse and sbt-idea to synchronize
the SBT project metadata into each IDE.
The experience of jumping between these 3 tools, and constantly
mapping the concepts between them, has dragged me through several
frustrations, which are the subject of this email.
Eclipse's core model of Projects in a Workspace is conceptually clear,
modular and flexible.It's strength is that it makes a minimal
assumption about what Projects in the same Workspace have in common:
that the user wants to view them together, and that dependencies are
satisfied. The modular nature of Eclipse Project dependencies means
that you simply declare what other visible projects you depend upon.
Neither SBT nor Intellij's models are as clearly or neatly expressed.
Now, Intellij's Projects are roughly equivalent to Eclipse Workspaces,
while Modules map to Eclipse's Projects. So fundamentally Intellij's
model is pretty equivalent to Eclipse's, and offers similar
modularity. But the naming and the description of the Intellij model
is misleading. Eg, I find their description of a Project as an "an
organizational unit that represents a complete software solution"
quite indistinct and "hand-wavey". It doesn't emphasize enough that
Modules are key, the unit's of reuse, and can be members of many
Projects at the same time.
And this mislabelling of the concepts in the Intellij model does,
alas, mislead people and have real consequences. If you grok Intellij
& SBT, it becomes clear that an SBT "Project" is basically equivalent
to an Intellij "Module".
But alas, when sbt-idea generates Intellij descriptors, it creates an
Intellij Projects for SBT Projects Oh noes! In Eclipse parlance, a
new top-level workspace for every SBT project. That leads to
brokenness like this [
https://github.com/mpeltonen/sbt-idea/issues/79]
And pursuing how sbt-idea tries to support multi-module projects leads
towards multi project support in SBT itself :( Why, when its so easy
to depend upon a binary artefact in SBT, is it so clumsy to depend
upon another project?
Firstly, you cant declare project dependencies in .sbt files. Ugh!
Ether fix it or deprecate the sbt dialect and go back to .scala files.
And secondly, the suggestion of parent-child relationships
[
http://www.scala-sbt.org/release/docs/Getting-Started/Multi-Project.html]
to model dependency graphs is neither necessary nor particularly
modular. There is no need for a root container project at all, just
each project declares paths to projects they depend upon. That's all
that's needed.
-Ben