Repository navigation
Fall back to bare op names on old refactor-nrepl - #601
Merged
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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-hookand 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.
make compile)make test)