Skip to content

Commit 2c855f9

Browse files
authored
Add client-info to clone op (#3806)
* Add client-info to clone op * fix nrepl server mock
1 parent 340432f commit 2c855f9

File tree

3 files changed

+10
-2
lines changed

3 files changed

+10
-2
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
- [#3797](https://github.com/clojure-emacs/cider/issues/3797): Completion: enable `cider-completion-style` by default (this enables richer completion suggestions where candidates don't have to strictly match the prefix).
2828
- [#3803](https://github.com/clojure-emacs/cider/pull/3803): Enable dynamic indentation for `clojure-ts-mode`.
2929
- [#3805](https://github.com/clojure-emacs/cider/pull/3805): Profiler: update to latest profiling middleware.
30+
- [#3806](https://github.com/clojure-emacs/cider/pull/3806): Add client info to `clone` op request.
3031

3132
### Bugs fixed
3233

nrepl-client.el

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1032,12 +1032,16 @@ ADDITIONAL-PARAMS is a plist to be appended to the request message."
10321032
connection
10331033
tooling))
10341034

1035+
(defvar cider-version)
1036+
10351037
(defun nrepl-sync-request:clone (connection &optional tooling)
10361038
"Sent a :clone request to create a new client session.
10371039
The request is dispatched via CONNECTION.
10381040
Optional argument TOOLING Tooling is set to t if wanting the tooling session
10391041
from CONNECTION."
1040-
(nrepl-send-sync-request '("op" "clone")
1042+
(nrepl-send-sync-request `("op" "clone"
1043+
"client-name" "CIDER"
1044+
"client-version" ,cider-version)
10411045
connection
10421046
nil tooling))
10431047

test/nrepl-server-mock.el

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,10 @@ requirements."
4343
(let* ((msg (queue-dequeue (cdr (nrepl-bdecode output))))
4444
(_ (mock/log! ":mock.filter/msg :in %S" msg))
4545
(response (pcase msg
46-
(`(dict "op" "clone" "id" ,id)
46+
(`(dict "op" "clone"
47+
"client-name" "CIDER"
48+
"client-version" ,cider-version
49+
"id" ,id)
4750
`(dict "id" ,id
4851
"session" "a-session"
4952
"status" ("done")

0 commit comments

Comments
 (0)