sbt / sbt-remote-control

Create and manage sbt process using unicorns and forks
Other
74 stars 14 forks source link

Split RequestListeners apart from ServerState #179

Closed havocp closed 10 years ago

havocp commented 10 years ago

We had a confusing situation before where ServerState was both a mutable field in ReadOnlyServerEngine, and attached to State and modified there between commands. The modifications made during commands by ServerEngine were never propagated back to ReadOnlyServerEngine.

This splits it up so that RequestListeners is a mutable field in ReadOnlyServerEngine which is frozen and handed off to ServerEngine with each request; and ServerState is only the extra state that ServerEngine sticks on sbt.State, and is only modified by changing what's on the sbt.State.

havocp commented 10 years ago

Merging since I got LGTM on https://github.com/sbt/sbt-remote-control/pull/180 which is a superset of this one ;-)