sbteclipse should manage to generate usable projects for SBT itself! #145

Blaisorblade opened this Issue Jan 22, 2013 · 1 comment


None yet

2 participants


I wanted to use Eclipse (3.7) with Scala-IDE nightly (it's the recommended setup to work on Scalac) to work on SBT. So, I tried using sbteclipse for this!
I found so many issues (with sbteclipse) that I'd like to say that it just didn't work. If you ever want to tackle this, just try doing it again.
But I'll summarize what I did from memory.

I built SBT, used sbteclipse to generate projects, did the same for SBinary since Eclipse asked for that (that might not be needed any more), and then tried to import existing projects from the SBT directory. Since they are not all in the same folder (unlike scala/scala's src/eclipse), Eclipse found just a few, and I started painstakingly importing each of them. Code generation was still only done through SBT - I probably added the folder with the generated code to the source folders; and of course I needed to disable automatic building. I had to punt on one Precompiled_X project and remove it from dependencies.

Hence, suggestions:

  • allow grouping subprojects in a single folder, as src/eclipse in scala/scala
  • Support SBT code generation and custom build handlers (Eclipse's builder is SBT-based anyway, and it supports pluggable builders; this might require support in Scala-IDE)
  • Simply try it out.

My current Eclipse projects, if you are interested, are here:

@Blaisorblade Blaisorblade referenced this issue in sbt/sbt Jan 22, 2013

Wip/warnings #648


See also #141. I believe that was the only truly blocking issue.

Regarding your other comments:

  • sbinary was a very problematic dependency because it was source dependency which is a cool feature but it's very hard to support in Eclipse. Sbt is using a regular dependency for sbinary again so this is not an issue anymore.
  • When it comes to Precompiled_ I believe it's not generated anymore but you would need to double check. Also, I think it should be possible to disable generation of that project using some additional configuration (no need to change sbteclipse itself for that).
  • Sbt generated source are indeed a bit problematic but the good news are that latest version of sbteclipse adds all necessary folders as source folders so you get products of source generators to be visible in Eclipse. I think that's good enough. You can always use sbt to regenerate those source if you happen to change definitions for source generators (which happens really rarely).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment