-
-
Notifications
You must be signed in to change notification settings - Fork 648
Fix inspector not using the appropriate REPL connection #3830
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix inspector not using the appropriate REPL connection #3830
Conversation
Hmm, perhaps it's the default that should be adjusted, as I find the difference in the behavior a bit weird. |
I guess Let me know what you prefer, but the inspector was definitely broken for me and tried sending forms from a |
@bbatsov So you want me to change this PR into changing the defaults of |
I think changing the default would be better, as it's reasonable to expect it'd be using |
27e4830
to
fd7edae
Compare
@bbatsov are we good? |
Just add a changelog entry for the bug-fix and we're good to go. |
cider-client.el
Outdated
@@ -187,7 +187,7 @@ REQUEST is a pair list of the form (\"op\" \"operation\" \"par1-name\" | |||
If CONNECTION is provided dispatch to that connection instead of | |||
the current connection. Return the id of the sent message. | |||
If TOOLING is truthy then the tooling session is used." | |||
(nrepl-send-request request callback (or connection (cider-current-repl 'any 'ensure)) tooling)) | |||
(nrepl-send-request request callback (or connection (cider-current-repl nil 'ensure)) tooling)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps we can also introduce some symbol with a more descriptive name for this case, as an alternative for nil
.
This fixes the inspector not using the appropriate REPL connection for the current buffer.
fd7edae
to
3e61299
Compare
@bbatsov how about |
Yeah, that'd be fine. |
I believe 9dc5107 introduced an issue where the inspector is potentially not using the correct nrepl connection for evaluation. This is because
cider-nrepl-send-sync-request
defaults to(cider-current-repl 'any 'ensure)
when given no connection, while callingcider-current-repl
without arguments infers the correct type from the current buffer. This PR simply adds back the calls tocider-current-repl
to the inspector.Before submitting the PR make sure the following things have been done (and denote this
by checking the relevant checkboxes):
eldev test
)eldev lint
) which is based onelisp-lint
and includescheckdoc
, check-declare, packaging metadata, indentation, and trailing whitespace checks.