Skip to content
Browse files

set semantics for :session in combine-responses is much saner

  • Loading branch information...
1 parent 0c68b85 commit 0398125adcf4a27a72a1fd1170183f585a320cf0 @cemerick cemerick committed
Showing with 4 additions and 4 deletions.
  1. +4 −4 src/main/clojure/clojure/tools/nrepl.clj
View
8 src/main/clojure/clojure/tools/nrepl.clj
@@ -118,16 +118,16 @@
Certain message slots are combined in special ways:
- only the last :ns is retained
- - :value and :session are accumulated into an ordered collection
- - :status is accumulated into a set
+ - :value is accumulated into an ordered collection
+ - :status and :session are accumulated into a set
- string values (associated with e.g. :out and :err) are concatenated"
[responses]
(reduce
(fn [m [k v]]
(case k
(:id :ns) (assoc m k v)
- (:value :session) (update-in m [k] (fnil conj []) v)
- :status (update-in m [k] (fnil into #{}) v)
+ :value (update-in m [k] (fnil conj []) v)
+ (:status :session) (update-in m [k] (fnil into #{}) v)
(if (string? v)
(update-in m [k] #(str % v))
(assoc m k v))))

0 comments on commit 0398125

Please sign in to comment.
Something went wrong with that request. Please try again.