Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit eb335cb

Browse filesBrowse files
committed
Allow starting the sideloader for the tooling session
CIDER's deferred loading of middleware means that requires can happen during all kinds of nREPL ops, many of which are performed over the tooling session. To make this work via the sideloader we need it to be active both on the regular session and on the tooling session, so provide a flag for starting it in either session.
1 parent 60d0e54 commit eb335cb
Copy full SHA for eb335cb

File tree

Expand file treeCollapse file tree

2 files changed

+10
-6
lines changed
Filter options
Expand file treeCollapse file tree

2 files changed

+10
-6
lines changed

‎cider-client.el

Copy file name to clipboardExpand all lines: cider-client.el
+4-3Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -162,13 +162,14 @@ Signal an error if it is not supported."
162162
(unless (cider-nrepl-op-supported-p op)
163163
(user-error "`%s' requires the nREPL op \"%s\" (provided by cider-nrepl)" this-command op)))
164164

165-
(defun cider-nrepl-send-request (request callback &optional connection)
165+
(defun cider-nrepl-send-request (request callback &optional connection tooling)
166166
"Send REQUEST and register response handler CALLBACK.
167167
REQUEST is a pair list of the form (\"op\" \"operation\" \"par1-name\"
168168
\"par1\" ... ).
169169
If CONNECTION is provided dispatch to that connection instead of
170-
the current connection. Return the id of the sent message."
171-
(nrepl-send-request request callback (or connection (cider-current-repl 'any 'ensure))))
170+
the current connection. Return the id of the sent message.
171+
If TOOLING is truthy then the tooling session is used."
172+
(nrepl-send-request request callback (or connection (cider-current-repl 'any 'ensure)) tooling))
172173

173174
(defun cider-nrepl-send-sync-request (request &optional connection abort-on-input)
174175
"Send REQUEST to the nREPL server synchronously using CONNECTION.

‎cider-eval.el

Copy file name to clipboardExpand all lines: cider-eval.el
+6-3Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -208,13 +208,16 @@ When invoked with a prefix ARG the command doesn't prompt for confirmation."
208208
(when (member "sideloader-lookup" status)
209209
(cider-request:sideloader-provide id type name))))))
210210

211-
(defun cider-request:sideloader-start (&optional connection)
211+
(defun cider-request:sideloader-start (&optional connection tooling)
212212
"Perform the nREPL \"sideloader-start\" op.
213-
If CONNECTION is nil, use `cider-current-repl'."
213+
If CONNECTION is nil, use `cider-current-repl'.
214+
If TOOLING is truthy then the operation is perfomed over the tooling
215+
session, rather than the regular session."
214216
(cider-ensure-op-supported "sideloader-start")
215217
(cider-nrepl-send-request `("op" "sideloader-start")
216218
(cider-sideloader-lookup-handler)
217-
connection))
219+
connection
220+
tooling))
218221

219222
(defun cider-request:sideloader-provide (id type file &optional connection)
220223
"Perform the nREPL \"sideloader-provide\" op for ID, TYPE and FILE.

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.