sbt/sbt-remote-control — pull request #220 by havocp (2014-10-08 20:20:39+00:00)
Title: Simplify watch/ValueChanged/BuildValue

* make BuildValue, TaskResult, ValueChanged into simple JsValue holders so we don't need the type parameter complexity
* we can thus drop `DynamicSerialization` and associated complexity from client side
* we then make `SbtClient.watch[T]` require a static Reads for the watched type so we have compile-time safety that we can deserialize
* if the server-provided value doesn't match the T we wanted to watch, we get a failure result passed to the watch listener
* we keep `SbtClient.rawWatch()` for now because it allows you to get a custom exception type. We can probably do better here, like a `watchWithCustomException[T,E]`.
* ValueChanged, TaskResult, and BuildValue could probably all be collapsed together or at least one of the three eliminated, but haven't done that in this patch; this would also lead to replacing rawWatch with some nicer approach probably.