mirror of https://github.com/sbt/sbt.git
notes
This commit is contained in:
parent
bd4ba31544
commit
a3357af540
|
|
@ -1,8 +1,7 @@
|
|||
|
||||
### Fixes with compatibility implications
|
||||
|
||||
- Deprecates the old symbolic operators, to be removed in sbt 1.0. See below for more details.
|
||||
- Deprecates the old sbt 0.10 syntax, to be removed in sbt 1.0. See http://www.scala-sbt.org/0.13/docs/Migrating-from-sbt-012x.html for more details. [#2763][2763]/[#2764][2764] by [@dwijnand][@dwijnand]
|
||||
- Deprecates the old sbt 0.12 DSL, to be removed in sbt 1.0. See below for more details.
|
||||
- The `.value` method is deprecated for input tasks. Calling `.value` on an input key returns an `InputTask[A]`,
|
||||
which is completely unintuitive and often results in a bug. In most cases `.evaluated` should be called,
|
||||
which returns `A` by evaluating the task.
|
||||
|
|
@ -90,21 +89,41 @@ by overriding `derivedProjects`:
|
|||
|
||||
[#2532][2532]/[#2717][2717]/[#2738][2738] by [@eed3si9n][@eed3si9n]
|
||||
|
||||
### Deprecate old operators
|
||||
### Deprecate old sbt 0.12 DSL
|
||||
|
||||
The no-longer-documented operators `<<=`, `<+=`, and `<++=` are deprecated,
|
||||
The no-longer-documented operators `<<=`, `<+=`, and `<++=` and tuple enrichments are deprecated,
|
||||
and will be removed in sbt 1.0.
|
||||
|
||||
For `<<=`, the suggested migration would be to use either `:=` or `~=` operators.
|
||||
The RHS of `<<=` takes an `Initialize[_]` expression, which can be converted to `:=` style
|
||||
by wrapping the expression in parenthesis, and calling `.value` at the end.
|
||||
For example:
|
||||
Generally,
|
||||
|
||||
key := (key.dependsOn(compile in Test)).value
|
||||
task3 <<= (task1, task2) map { (t1, t2) => println(t1 + t2); t1 + t2 }
|
||||
|
||||
For `<+=` and `<++=`, use `+= { x.value }` and `++= { x.value }`.
|
||||
should migrate to
|
||||
|
||||
[#2716][2716] by [@eed3si9n][@eed3si9n]
|
||||
task3 := {
|
||||
println(task1.value + task2.value)
|
||||
task1.value + task2.value
|
||||
}
|
||||
|
||||
Except for source generators, which requires task values:
|
||||
|
||||
sourceGenerators in Compile <+= buildInfo
|
||||
|
||||
This becomes:
|
||||
|
||||
sourceGenerators in Compile += buildInfo.taskValue
|
||||
|
||||
Another exception is input task:
|
||||
|
||||
run <<= docsRunSetting
|
||||
|
||||
This becomes:
|
||||
|
||||
run := docsRunSetting.evaluated
|
||||
|
||||
See [Migrating from sbt 0.12.x](http://www.scala-sbt.org/0.13/docs/Migrating-from-sbt-012x.html) for more details.
|
||||
|
||||
[#2716][2716]/[#2763][2763]/[#2764][2764] by [@eed3si9n][@eed3si9n] and [@dwijnand][@dwijnand]
|
||||
|
||||
[g8]: http://www.foundweekends.org/giter8/
|
||||
[eed3si9n/hello.g8]: https://github.com/eed3si9n/hello.g8
|
||||
|
|
|
|||
Loading…
Reference in New Issue