mirror of https://github.com/sbt/sbt.git
Fixes sbt/sbt#4595 Ref #290 Ref #280 This is bit of an odd one. To keep bincompat and also to fix sbt 0.13 compatibility issue we have made `Disabled` companion object extend `Disabled` type. This actually created a subtle deserialization issue: ``` [error] scala.MatchError: Disabled() (of class sbt.librarymanagement.Disabled$) [error] at sjsonnew.FlatUnionFormats$$anon$5.write(FlatUnionFormats.scala:220) [error] at sjsonnew.JsonWriter.addField(JsonFormat.scala:40) [error] at sjsonnew.JsonWriter.addField$(JsonFormat.scala:37) [error] at sjsonnew.FlatUnionFormats$$anon$5.addField(FlatUnionFormats.scala:208) [error] at sjsonnew.Builder.addField(Builder.scala:43) [error] at sbt.librarymanagement.ModuleIDFormats$$anon$1.write(ModuleIDFormats.scala:46) ``` This is because Contraband generates `flatUnionFormat5[CrossVersion, Disabled, ...]` for all of the subtypes of `CrossVersion`, which uses the runtime type information. Now that `Disabled` object is also in the mix, this created JSON that `CrossVersionFormats` cannot deserialize. This brings the code into src/ so we can write this part manually. |
||
|---|---|---|
| .. | ||
| DatatypeConfig.scala | ||
| Dependencies.scala | ||
| SbtScriptedIT.scala | ||
| Util.scala | ||
| build.properties | ||
| plugins.sbt | ||