mirror of https://github.com/sbt/sbt.git
Improve deprecation message
This commit is contained in:
parent
cfac453c07
commit
620a49bb0c
|
|
@ -72,13 +72,11 @@ object TaskMacro {
|
||||||
final val TransformInitName = "transform"
|
final val TransformInitName = "transform"
|
||||||
final val InputTaskCreateDynName = "createDyn"
|
final val InputTaskCreateDynName = "createDyn"
|
||||||
final val InputTaskCreateFreeName = "createFree"
|
final val InputTaskCreateFreeName = "createFree"
|
||||||
final val append1Migration = "Use `lhs += { x.value }`."
|
final val append1Migration = "`<+=` operator is deprecated. Use `lhs += { x.value }`."
|
||||||
final val appendNMigration = "Use `lhs ++= { x.value }`."
|
final val appendNMigration = "`<++=` operator is deprecated. Use `lhs ++= { x.value }`."
|
||||||
final val assignMigration =
|
final val assignMigration =
|
||||||
"""Use `key := { x.value }` or `key ~= (old => { newValue })`.
|
"""`<<=` operator is deprecated. Use `key := { x.value }` or `key ~= (old => { newValue })`.
|
||||||
|The RHS of `<<=` takes an `Initialize[_]` expression, which can be converted to `:=` style
|
|See http://www.scala-sbt.org/0.13/docs/Migrating-from-sbt-012x.html""".stripMargin
|
||||||
|by wrapping the expression in parenthesis, and calling `.value` at the end.
|
|
||||||
|For example, `key := (key.dependsOn(compile in Test)).value`.""".stripMargin
|
|
||||||
|
|
||||||
def taskMacroImpl[T: c.WeakTypeTag](c: Context)(t: c.Expr[T]): c.Expr[Initialize[Task[T]]] =
|
def taskMacroImpl[T: c.WeakTypeTag](c: Context)(t: c.Expr[T]): c.Expr[Initialize[Task[T]]] =
|
||||||
Instance.contImpl[T, Id](c, FullInstance, FullConvert, MixedBuilder)(Left(t), Instance.idTransform[c.type])
|
Instance.contImpl[T, Id](c, FullInstance, FullConvert, MixedBuilder)(Left(t), Instance.idTransform[c.type])
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue