Stop auto-wiring piggieback via :requires magic
还没有人认领这个 Issue。
评估
调研方向
从 refactor-nrepl.middleware/wrap-refactor 开始,定位 maybe-require-piggieback,然后检查 refactor-nrepl.ns.resolve-missing-test 及其 session-fixture/default-handler 设置。在跟踪服务器何时启动以及 piggieback binding 何时应用的同时,运行指定的测试。完成的标准是 descriptor 不再依赖自动注入 piggieback,且测试仍然通过;可选的 grab-cljs-env 更改是独立的。
由索引模型根据 Issue 内容生成。
描述
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-piggiebackand don't put piggieback into:requires. Thewrap-refactordescriptor stays piggieback-free. - The only test that needs cljs is
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). - Optional: inline
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-descriptors is on borrowed time so it's worth doing before nREPL drops it.
- 主要语言
- Clojure
- 星标
- 261
- 派生
- 68
- 平均合并
- 10 小时 36 分钟
- 30 天内合并 PR
- 8
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
clojure-emacs/refactor-nrepl 的其他 Issue
-
难度 4/5 3-5 天 新手友好度 45/100
clojure-emacs/refactor-nrepl#444 ·
-
Analyse some real-world projects in CI可能重新可做 @vemv 于 1962 天前认领,目前没有进行中的 PR。 未关闭
clojure-emacs/refactor-nrepl#322 · 4 条评论 · 1 个 reaction · 已指派 1 人 ·
-
enhancement
难度 4/5 3-5 天 新手友好度 42/100
clojure-emacs/refactor-nrepl#266 · 4 条评论 · 4 个 reaction ·
-
难度 5/5 一周以上 新手友好度 25/100
clojure-emacs/refactor-nrepl#195 · 39 条评论 · 7 个 reaction ·
查看 clojure-emacs/refactor-nrepl 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 70/100
clojure-emacs/cider#4235 ·
维护者通常 1 天内回复
-
needs triage
难度 2/5 1-3 小时 新手友好度 72/100
维护者通常 1 天内回复
-
`batch-transact-with-temp-conn!` leaves `:max-tx` behind its datoms, so the next transaction reuses a tx id可能已有人在做 @tiensonqin 于 1 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 70/100
-
Server logs every websocket send at DEBUG since #8844, adding lag under load可能已有人在做 @matthewlehew 于 1 天前认领。 未关闭
难度 1/5 1 小时以内 新手友好度 82/100
维护者通常 1 天内回复
-
.Team/Graphy
难度 2/5 1-3 小时 新手友好度 74/100
metabase/metabase#87741 · 1 条评论 ·
维护者通常 1 天内回复