Stop auto-wiring piggieback via :requires magic

Abierto
#443 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
58/100
Tipo de issue
Refactorización
Claridad
Bastante claro
Estado de actividad
Tranquilo
Stack tecnológico
clojure
Área
tooling

Línea de trabajo

Empieza en refactor-nrepl.middleware/wrap-refactor y localiza maybe-require-piggieback; después inspecciona refactor-nrepl.ns.resolve-missing-test y su configuración de session-fixture/default-handler. Ejecuta el test mencionado mientras rastreas cuándo se inicia el servidor y cuándo se aplica el binding de piggieback. El trabajo está terminado cuando el descriptor ya no depende de la inyección automática de piggieback y el test sigue pasando; el cambio opcional de grab-cljs-env es independiente.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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:

  1. Delete maybe-require-piggieback and don't put piggieback into :requires. The wrap-refactor descriptor stays piggieback-free.
  2. 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).
  3. 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.

Lenguaje dominante
Clojure
Estrellas
261
Forks
68
Merge medio
10 h 36 min
PR fusionados (30 d)
8

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de clojure-emacs/refactor-nrepl

Todos los issues de clojure-emacs/refactor-nrepl

Issues similares

Más issues de Clojure

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.