0

We have a project that uses Scala macros. Scala IDE 4.1 supports Scopes to ease compilation of projects with macros. However, when I use sbt eclipse, the generated project does not show macros as a source folder and does not create separate outputs for each source folder. Is this a missing feature in SBT? Is there any workaround?

My build.sbt file looks like this:

name in ThisBuild := "Test"

organization in ThisBuild := "org.test"

version in ThisBuild := "0.1.0"

scalaVersion in ThisBuild := "2.11.6"

libraryDependencies ++= Seq(
    "org.scalatest" % "scalatest_2.11" % "2.2.4" % "test",
    "junit" % "junit" % "4.11"
)
Wickoo
  • 6,745
  • 5
  • 32
  • 45
  • What is your project layout? Macros should be located in their own project, this way sbteclipse generates the correct Eclipse files. – kiritsuku Jun 11 '15 at 22:38
  • you mean a multi-project configuration in SBT? To me it looks like that Eclipse IDE 4.1 just support macros in a separate `macros` folder and I thought based on the name of the folder should figure it out. – Wickoo Jun 12 '15 at 01:40
  • You should show your sbt configuration. You need to specify this `macros` folder as a separate source folder, otherwise Eclipse can't recognize it as such (or you do the configuration only in Eclipse). – kiritsuku Jun 12 '15 at 09:31
  • I updated the question with my build.sbt. You mean by using something like: `unmanagedSourceDirectories in Compile += baseDirectory.value / "extra-src"`? – Wickoo Jun 12 '15 at 12:25

0 Answers0