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.
Ref https://github.com/sbt/librarymanagement/pull/280
This is to workaround bincompat error detected by sbt community build.
```
[cats] [error] java.lang.NoSuchMethodError: sbt.librarymanagement.CrossVersion$.Disabled()Lsbt/librarymanagement/Disabled$;
```
Fixes#274
In #249 parallel download switched to using its own thread pool.
It could potentially lead to unbounded download if nobody throttled.
This works around the issue by fixing the number of thread to 6, which is a common per-host max connection count.
Rather than
[warn] There may be incompatibilities among your library dependencies.
[warn] Run 'evicted' to see detailed eviction warnings
[info] Done updating.
[warn] There may be incompatibilities among your library dependencies.
[warn] Run 'evicted' to see detailed eviction warnings
[info] Done updating.
[warn] There may be incompatibilities among your library dependencies.
[warn] Run 'evicted' to see detailed eviction warnings
[info] Done updating.
[warn] There may be incompatibilities among your library dependencies.
[warn] Run 'evicted' to see detailed eviction warnings
I would get:
[warn] There may be incompatibilities among your library dependencies; run 'evicted' to see detailed eviction warnings
[info] Done updating.
[warn] There may be incompatibilities among your library dependencies; run 'evicted' to see detailed eviction warnings
[info] Done updating.
[warn] There may be incompatibilities among your library dependencies; run 'evicted' to see detailed eviction warnings
[info] Done updating.
[warn] There may be incompatibilities among your library dependencies; run 'evicted' to see detailed eviction warnings
which is a touch better. (IMO!)