Skip to content

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ak-coram
Copy link
Contributor

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 calling cider-current-repl without arguments infers the correct type from the current buffer. This PR simply adds back the calls to cider-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):

  • The commits are consistent with our contribution guidelines
  • You've added tests (if possible) to cover your change(s)
  • All tests are passing (eldev test)
  • All code passes the linter (eldev lint) which is based on elisp-lint and includes
  • You've updated the changelog (if adding/changing user-visible functionality)
  • You've updated the user manual (if adding/changing user-visible functionality)

@bbatsov
Copy link
Member

bbatsov commented Jul 18, 2025

Hmm, perhaps it's the default that should be adjusted, as I find the difference in the behavior a bit weird.

@ak-coram
Copy link
Contributor Author

I guess any really means any kind of REPL, although this behaviour doesn't sound that useful.

Let me know what you prefer, but the inspector was definitely broken for me and tried sending forms from a .clj file to the CLJS connection without this change.

@ak-coram
Copy link
Contributor Author

@bbatsov So you want me to change this PR into changing the defaults of cider-nrepl-send-sync-request or leave it as is?

@bbatsov
Copy link
Member

bbatsov commented Jul 22, 2025

I think changing the default would be better, as it's reasonable to expect it'd be using cider-current-repl.

This fixes the inspector not using the appropriate REPL connection for
the current buffer.
@ak-coram ak-coram force-pushed the fix-inspector-repl-connection branch from 27e4830 to fd7edae Compare July 23, 2025 15:01
@ak-coram
Copy link
Contributor Author

@bbatsov are we good?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants