|
| 1 | +[@dwijnand]: https://github.com/dwijnand |
| 2 | + |
| 3 | +sbt-buildinfo 0.9.0 is published for sbt 1. |
| 4 | + |
| 5 | +### `TaskKey` to `BuildInfoKey` conversion potentially breaking semantic change |
| 6 | + |
| 7 | +*TL;DR* No need for `BuildInfoKey.of(...)` or `BuildInfoKey.ofN(...)` any more. Use |
| 8 | +`BuildInfoKey.outOfGraphUnsafe` if your build definition is now circular. |
| 9 | + |
| 10 | +sbt-buildinfo 0.8.0 deprecated the original `TaskKey[A]` to `BuildInfoKey.Entry[A]` implicit and explicit |
| 11 | +conversions (`BuildInfoKey.task` and `BuildInfoKey.apply` respectively), that executed the underlying sbt Task |
| 12 | +out of sbt's task graph execution, in favour of a newly introduced `BuildInfoKey.of(...)` and |
| 13 | +`BuildInfoKey.ofN(...)` API, which correctly wired up the task graph. See [#114][]. |
| 14 | + |
| 15 | +As it was implemented (and released) it interacted poorly with sbt-buildinfo's `BuildInfoKey.map` API |
| 16 | +([#117][]), due to a mistake in the implementation and test coverage. |
| 17 | + |
| 18 | +In resolving the issue it became clear that instead of introducing a new API, that required sbt-buildinfo users |
| 19 | +to change their source code to use, the already used conversions could have been modified to use the new |
| 20 | +Task-based semantics. |
| 21 | + |
| 22 | +However, this change breaks any build definition that declares as a build info key any `TaskKey` that depends on |
| 23 | +`sourceGenerators` or `resourceGenerators`, because the build definiton would now be circular and fail to load. |
| 24 | +To fix this breaking semantic change the user has to either drop the key used, choose another key, or fallback |
| 25 | +to the previous semantics by using the not-deprecated `BuildInfoKey.outOfGraphUnsafe` API, also introduced in |
| 26 | +sbt-buildinfo 0.8.0. |
| 27 | + |
| 28 | +[#117][]/[#119][] by [@dwijnand][] |
| 29 | + |
| 30 | +[#114]: https://github.com/sbt/sbt-buildinfo/pull/114 |
| 31 | +[#117]: https://github.com/sbt/sbt-buildinfo/issues/117 |
| 32 | +[#119]: https://github.com/sbt/sbt-buildinfo/pull/119 |
| 33 | + |
| 34 | +### Add direct support for sbt's `Attributed` |
| 35 | + |
| 36 | +A number of keys defined by sbt use sbt's `Attributed` type, specifically the keys that define classpaths. |
| 37 | +Prior to this change defining any of these keys as a build info key would generate `Seq[String]` as `Attributed` |
| 38 | +would be simply converted to string with `toString`. sbt-buildinfo 0.9.0 introduces direct support for these |
| 39 | +keys so they generate `Seq[File]` instead. |
| 40 | + |
| 41 | +[#112][]/[#120][] by [@dwijnand][] |
| 42 | + |
| 43 | +[#112]: https://github.com/sbt/sbt-buildinfo/issues/112 |
| 44 | +[#120]: https://github.com/sbt/sbt-buildinfo/pull/120 |
0 commit comments