Manage Scopes Settings correctly
adampauls opened this issue · comments
I tried adding an IntegrationTest configuration to my build by doing this in build.sbt
:
lazy val IntegrationTest = config("it") extend(Test)
and then
EclipseKeys.configurations += IntegrationTest
The first line ensures that the integration tests can depend on code in the src/test/scala
directory. In order for the scoped compiler to work correctly in these conditions, the src/it/scala
folder needs to be compiled during the tests
scope. This is set by adding the line
//src/it/scala=tests
to org.scala-ide.sdt.core.prefs
. Unfortunately, whenever sbt eclipse
is run, the org.scala-ide.sdt.core.prefs
file gets overwritten, so even if I manually add this setting, it gets overwritten on a clean rebuild. It would be nice if this were inferred automatically, or at a minimum there were an additional configuration option to fix it.