Right now refactor-nrepl.middleware/wrap-refactor declares #'cider.piggieback/wrap-cljs-repl in its descriptor's :requires set whenever piggieback happens to be on the classpath. nREPL responds to this by warning that piggieback isn't in the middleware list and then injecting it automatically (extended-descriptors in nrepl.middleware, marked TODO: stop adding missing deps in future versions.).
This is exactly the kind of magic that cider-nrepl 0.59 set out to remove with PR #971 — they deprecated their own requires-piggieback helper to a no-op for the same reason. We're currently leaning on the deprecated nREPL behavior instead, just inlined locally.
Cleaner direction:
- Delete
maybe-require-piggieback and don't put piggieback into :requires. The wrap-refactor descriptor stays piggieback-free.
- The only test that needs cljs is
refactor-nrepl.ns.resolve-missing-test. Its fixture already passes piggieback to default-handler, but the rebinding happens after session-fixture has already started the server, so the binding doesn't take effect. The fixture currently "works" only because nREPL auto-injects piggieback. Restructure it to start the server inside the binding (or stop composing with the default session-fixture for this test).
- Optional: inline
cider.nrepl.middleware.util.cljs/grab-cljs-env inside refactor-nrepl.ns.resolve-missing so we no longer depend on cider-nrepl's util/cljs namespace at all.
Not urgent — the current setup works on cider-nrepl 0.59 and the test passes locally and in CI. But extended-descriptors is on borrowed time so it's worth doing before nREPL drops it.
Right now
refactor-nrepl.middleware/wrap-refactordeclares#'cider.piggieback/wrap-cljs-replin its descriptor's:requiresset whenever piggieback happens to be on the classpath. nREPL responds to this by warning that piggieback isn't in the middleware list and then injecting it automatically (extended-descriptorsinnrepl.middleware, markedTODO: stop adding missing deps in future versions.).This is exactly the kind of magic that cider-nrepl 0.59 set out to remove with PR #971 — they deprecated their own
requires-piggiebackhelper to a no-op for the same reason. We're currently leaning on the deprecated nREPL behavior instead, just inlined locally.Cleaner direction:
maybe-require-piggiebackand don't put piggieback into:requires. Thewrap-refactordescriptor stays piggieback-free.refactor-nrepl.ns.resolve-missing-test. Its fixture already passes piggieback todefault-handler, but the rebinding happens aftersession-fixturehas already started the server, so the binding doesn't take effect. The fixture currently "works" only because nREPL auto-injects piggieback. Restructure it to start the server inside the binding (or stop composing with the defaultsession-fixturefor this test).cider.nrepl.middleware.util.cljs/grab-cljs-envinsiderefactor-nrepl.ns.resolve-missingso we no longer depend on cider-nrepl'sutil/cljsnamespace at all.Not urgent — the current setup works on cider-nrepl 0.59 and the test passes locally and in CI. But
extended-descriptorsis on borrowed time so it's worth doing before nREPL drops it.