Skip to content

Fall back to bare op names on old refactor-nrepl - #601

Merged
bbatsov merged 5 commits into
masterfrom
legacy-op-fallback
Jul 16, 2026
Merged

bbatsov merged 5 commits into
masterfrom
legacy-op-fallback

Conversation

@bbatsov

@bbatsov bbatsov commented Jul 16, 2026

Copy link
Copy Markdown
Member

The switch to namespaced middleware ops broke every middleware-backed command against refactor-nrepl older than 3.13.0, which only advertises the bare names. Worst hit was cljr-slash: its middleware-unavailable fallback is deliberately quiet, so magic requires for project aliases just stopped doing anything (reported on Slack; the reporter suspected the CIDER 2.0 upgrade, but that was a red herring). Ops are now resolved against the connection - the namespaced form when advertised, the bare name otherwise - the same trick CIDER 2.0 uses for its own legacy op names.

This also makes the connect-time version probe non-fatal. CIDER 2.0's senders reject unsupported ops client-side, so a missing middleware errored out of cider-connected-hook and killed the very out-of-sync warning that should have flagged the problem.

Verified live against refactor-nrepl 3.9.1 and 3.14.0 with the CIDER 2.0 snapshot.

  • The commits are consistent with our contribution guidelines
  • You've added tests (if possible) to cover your change(s)
  • The new code is not generating byte compile warnings (run make compile)
  • All tests are passing (run make test)
  • You've updated the changelog (if adding/changing user-visible functionality)
  • You've updated the readme (if adding/changing user-visible functionality)

bbatsov added 5 commits July 15, 2026 12:32
Mirrors the config used in CIDER.
Normalize all bullets to dashes, disable the line-length and
duplicate-heading rules that don't fit a changelog, and wrap one
bare issue URL.
The switch to namespaced middleware ops silently broke every command
against refactor-nrepl < 3.13.0, which only advertises the bare names.
Worst hit was cljr-slash: its middleware-unavailable fallback is
deliberately quiet, so magic requires for project aliases just stopped
doing anything.

Resolve each op against the connection instead: prefer the canonical
refactor/ form and fall back to the bare name when only that is
advertised, mirroring what CIDER 2.0 does for its own legacy op names.
CIDER 2.0's senders reject unsupported ops client-side, so when
refactor-nrepl isn't on the classpath the connect-time version probe
signaled a user-error from cider-connected-hook: the out-of-sync
warning never fired, the artifact-cache init was skipped, and the echo
area showed a cryptic message blaming cider-nrepl. Report a failed
probe as a message and return nil, so the existing warning path kicks
in instead.
@bbatsov
bbatsov merged commit c267fd9 into master Jul 16, 2026
10 of 13 checks passed
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