I'm having an issue migrating my project to SBT 0.13
.
For some reason, the snippet from Generate sources from the SBT documentation doesn't work for me.
Neither a simple .sbt
build definition nor a Scala build definition work, unfortunately. Project definition is taken from the documentation:
name := "sbt-test"
sourceGenerators in Compile += Def.task {
val file = (sourceManaged in Compile).value / "demo" / "Test.scala"
IO.write(file, """object Test extends App { println("Hi") }""")
Seq(file)
}
The compiler complains about the type error when compiling the project definition:
~/P/sbt-test ▶ sbt
[info] Loading global plugins from /Users/phearnot/.sbt/0.13/plugins
[info] Loading project definition from /Users/phearnot/Projects/sbt-test/project
/Users/phearnot/Projects/sbt-test/build.sbt:3: error: No implicit for Append.Value[Seq[sbt.Task[Seq[java.io.File]]], sbt.std.FullInstance.M[Seq[java.io.File]]] found,
so sbt.std.FullInstance.M[Seq[java.io.File]] cannot be appended to Seq[sbt.Task[Seq[java.io.File]]]
sourceGenerators in Compile += Def.task {
^
[error] Type error in expression
Project loading failed: (r)etry, (q)uit, (l)ast, or (i)gnore?
UPDATE: Now that AlexIv has pointed out the problem in my SBT file definition, I wonder what is the proper way to move it into a Scala build definition?