1

I imported an eclipse project from an sbt multi project. The sbt eclipse command did complete normally But the resulting eclipse project is full of errors as dependency between sub projects are not seen. I think the sbt plugin is failing on multi projects, or am I missing something. The project run from sbt runs flawlessly. But I have no IDE support.

I tried Idea, the multiproject loads flawlessly, but the type indication on flyover is super slow and very often freeze Idea, it is unusable. Eclipse as tons of errors because of depencies, but for the type recognised, it gives them very quickly. I hope somebody has a solution.

Serge B
  • 251
  • 1
  • 2
  • 3
  • Did you do `sbt eclipse` on every subproject? – insan-e Jul 02 '16 at 23:47
  • No I did run sbt eclipse on the main project. Should I have run it on each sub projects ? – Serge B Jul 03 '16 at 11:55
  • I think you should, I can't import them unless I do that. Neither the Eclipse shoud be able to reason about them untill you do it... – insan-e Jul 03 '16 at 14:07
  • I do not think so ? I cannot run eclipse in all those projects since for a multi project there is only one build.sbt that is needed by the eclipse plugin ? – Serge B Jul 03 '16 at 17:00
  • I added the following command: EclipseKeys.skipParents in ThisBuild := false It now has everything in one project with the subproject as they should be. But somehow I have another issue, to find symbols it seems not all sub projects are linked, it complains about paths. I do believe that this eclipse set plugin is defective ? – Serge B Jul 03 '16 at 17:08
  • 1
    In Idea I have the project correctly compiled, but asking for types often hangs Idea totally. I start to understand people recommending not to use IDE, it is depressing. The set eclipse plugin has all the info on the build.sbt, it should not need anything else ? Looks like I will have to abandon IDE's – Serge B Jul 03 '16 at 17:09

1 Answers1

0

I guess that you must run "sbt eclipse" from the root sbt project directoy, and then, when importing into eclipse, click the checkbox "search for nested proyects". That will create a separate proyect for any of the multiple sbt subprojects. And the references between them will be found.

Luis
  • 159
  • 4
  • 12