Skip to content

Finish the keyword-argument request-API migration#4029

Merged
bbatsov merged 1 commit into
masterfrom
finish-keyword-migration
Jun 26, 2026
Merged

Finish the keyword-argument request-API migration#4029
bbatsov merged 1 commit into
masterfrom
finish-keyword-migration

Conversation

@bbatsov

@bbatsov bbatsov commented Jun 26, 2026

Copy link
Copy Markdown
Member

Drives the recently-started keyword-API migration to the finish line. Every caller now uses the keyword-argument request forms, and the positional shims are deprecated via make-obsolete so the byte-compiler flags any new use (same enforcement pattern as #4028's cider-ensure-op-supported).

Migrated (all call sites) and deprecated:

  • cider-nrepl-send-sync-request -> cider-nrepl-sync-request (62 call sites)
  • cider-nrepl-request:eval -> cider-nrepl-send-eval-request
  • nrepl-send-sync-request -> nrepl-sync-request
  • nrepl-request:eval -> nrepl-send-eval-request

The shims still work for external callers - only their internal use is gone.

Notes:

  • The cider-level keyword sync form takes connection as a :keyword; only one call site (cider-ns.el) passed it positionally and was converted. The low-level form keeps connection positional, so those were plain renames.
  • Test spies/stubs were repointed to the keyword forms (otherwise they'd no longer intercept). The shim-delegation specs are kept (wrapped in with-suppressed-warnings) so we still verify the shims forward correctly while deprecated.
  • Updated the transport-lint allowlist - cider-repl-require-repl-utils now uses nrepl-sync-request.

Clean --warnings-as-errors compile (no obsolete warnings, since nothing internal calls the shims) and full suite green.

Move every caller off the positional request shims to the
keyword-argument forms, then mark the shims obsolete so the
byte-compiler flags any new use (same approach as
`cider-ensure-op-supported'):

  cider-nrepl-send-sync-request -> cider-nrepl-sync-request
  cider-nrepl-request:eval      -> cider-nrepl-send-eval-request
  nrepl-send-sync-request       -> nrepl-sync-request
  nrepl-request:eval            -> nrepl-send-eval-request

The shims still work for external callers; only their internal use is
gone.  Repoint the test spies/stubs to the keyword forms, and keep the
shim-delegation specs (wrapped in `with-suppressed-warnings') so we
still verify the shims forward correctly during the deprecation window.
Update the transport-lint allowlist (`cider-repl-require-repl-utils' now
uses `nrepl-sync-request').
@bbatsov bbatsov merged commit b9d23f8 into master Jun 26, 2026
13 checks passed
bbatsov added a commit that referenced this pull request Jun 26, 2026
A regression from #4029: `cider-sync-request:classpath' and
`cider-sync-request:lookup' passed the connection positionally to
`cider-nrepl-sync-request' (via thread-first), but the keyword form
takes it as `:connection'.  These two call sites were missed because the
threaded request makes the connection look like the sole argument.

Pass it as `:connection' and add regression specs.
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