This fixes the following error when trying to use inputTaskDyn in a build:
[error] /tmp/sbt_8316130f/input-task-dyn/build.sbt:11: error: Macro
expansion contains free type variable T defined by wrap in
InputConvert.scala:76:20. Have you forgotten to use c.WeakTypeTag
annotation for this type parameter? If you
have troubles tracking free type variables, consider using -Xlog-free-types (out-1)
[error] runFoo := Def.inputTaskDyn { (out-1)
[error] ^ (out-1)
[info] [error] sbt.compiler.EvalException: Type error in expression (out-3) (out-1)
I have no idea what the error means, I just implemented the suggested fix.
This adds a macro-level hack to support += op for sourceGenerators and resourceGenerators using RHS of Initialize[Task[Seq[File]]].
When the types match up, the macro now calls `.taskValue` automatically.
The old operators `<<=`, `<+=`, and `<++=` are now replaced with
Restligeist macros that will always fail during compile-time but can
display migration guide as the error message.
This would provide better upgrade experience than simply removing the
methods and displaying `<<= is not a member of sbt.TaskKey`.
* Remove .value from input tasks. Ref #2709
Calling `.value` method on an input task returns `InputTask[A]`, which
is completely unintuitive and often results to a bug.
In most cases `.evaluated` should be called, which returns `A` by
evaluating the task. Just in case `InputTask[A]` is needed,
`toInputTask` method is now provided.
* Fixed test
* Rename toInputTask to inputTaskValue