Skip to content

Fix compatibility with latest CIDER's cider-repls API#21

Open
gveres wants to merge 1 commit intocorgi-emacs:mainfrom
gveres:fix/cider-repls-required-ops-compatibility
Open

Fix compatibility with latest CIDER's cider-repls API#21
gveres wants to merge 1 commit intocorgi-emacs:mainfrom
gveres:fix/cider-repls-required-ops-compatibility

Conversation

@gveres
Copy link
Contributor

@gveres gveres commented Nov 27, 2025

Summary

Fixes compatibility issue with the latest version of CIDER where cider-repls API signature changed to include a third optional parameter.

Problem

CIDER updated cider-repls function signature from:

(defun cider-repls (&optional type ensure)

to:

(defun cider-repls (&optional type ensure required-ops)

This caused corgi/around-cider-repls advice to fail with:

Debugger entered--Lisp error: (wrong-number-of-arguments (1 . 3) 4)
  corgi/around-cider-repls(#<subr cider-repls> cljs nil nil)

Solution

  • Updated corgi/around-cider-repls to accept the new required-ops parameter
  • Added filtering logic to support CIDER's operation-based REPL filtering
  • Maintains backward compatibility when required-ops is nil

Testing

  • Verified no byte-compilation errors
  • Signature now matches CIDER's current API
  • Filtering logic follows CIDER's implementation pattern
  • Tested with actual CIDER evaluation and confirmed fix works

🤖 Generated with Claude Code

CIDER updated cider-repls to accept a third optional parameter
'required-ops' for filtering REPLs by supported nREPL operations.
The corgi/around-cider-repls advice function only accepted 2 optional
parameters, causing an arity mismatch error.

Changes:
- Updated corgi/around-cider-repls signature to accept required-ops
- Added filtering logic to support operation-based REPL filtering
- Maintains backward compatibility when required-ops is nil

Fixes: wrong-number-of-arguments (1 . 3) 4 error when evaluating
Clojure expressions

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
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.

1 participant