clojure-emacs/cider — pull request #804 by vitoshka (2014-09-15 19:31:55+00:00)
Title: Rewrite `sync-request` subsystem

Changes to `nrepl-send-sync-request`:

- returned response is in a standard nREPL form (:done and :value were confusing)
- returned response is a merged dictionary of all the key-vals received so far (not just of "value", "out" and "err" keys as it was before).
- nrepl-operation is now checked inside this function
- when only "value" slot is requested, `err` and `out` are meaningfully handled

Other changes:

- Reduce redundancy in eval APIs by removing several eval functions on CIDER
side. They were either not used or could be replaced with direct calls to
nrepl API.
- Enforce `cider-sync-request:MILDLEWARE` convention and move all requests
into `cider-client.el`.

-----

After grouping all requests together some question marks emerged.

- Not all requests send the "session" argument. It still works but I assume it's an oversight. I didn't change that.
- `macroexpand` op is special as it's imlemented as 3 separate ops "macroexpand" "macroexpand-1" "macroexpand-all". I think this is confusing. It should be one middleware with "expander" parameter.
- All requests are using `current-session`, shouldn't they be using `tooling-session` instead? Otherwise tooling session is not much used. I wonder if it could be dispensed with altogether.