Don't unwrap CLJC lib specs when cleaning a namespace
还没有人认领这个 Issue。
评估
调研方向
首先跟踪处理命名空间 :require forms 的 cljr-clean-ns 入口点,重点关注 CLJC reader-conditionals 的展开方式。使用此 issue 中的示例命名空间作为输入,并验证现有的条件结构会被保留,而不是完全展开,同时已经完全展开的 forms 保持不变。
由索引模型根据 Issue 内容生成。
描述
We have a namespace like this:
(ns my.app.ns
(:require [vlad.core :as vlad :refer [attr chain join present Validation]]
#? (:cljs [goog.date.Interval :as Interval])
[clojure.string :as string]
[cemerick.url :as url]))
after running cljr-clean-ns, it fully expands the clj and cljs versions to:
(ns my.app.ns
#?@
(:clj
[(:require
[cemerick.url :as url]
[clojure.string :as string]
[vlad.core :as vlad :refer [attr chain join present Validation]])]
:cljs
[(:require
[cemerick.url :as url]
[clojure.string :as string]
[goog.date.Interval :as Interval]
[vlad.core :as vlad :refer [attr chain join present Validation]])]))
This namespace form is twice as long, and (IMO) obscures which parts of the namespace differ between clj and cljs. To tell the difference, you need to check each line and find the corresponding one in the other branch.
Would you consider a feature request to not fully expand CLJC forms in the :require?
I'd argue this should be the default behaviour, but could also see it being an option if people liked this kind of expansion. The new feature wouldn't automatically convert fully expanded CLJC forms back, it would just preserve what was already there.
- 主要语言
- 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 ·
-
难度 4/5 3-5 天 新手友好度 58/100
clojure-emacs/refactor-nrepl#443 ·
-
Analyse some real-world projects in CI可能重新可做 @vemv 于 1962 天前认领,目前没有进行中的 PR。 未关闭
clojure-emacs/refactor-nrepl#322 · 4 条评论 · 1 个 reaction · 已指派 1 人 ·
-
难度 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 天内回复
-
难度 2/5 1-3 小时 新手友好度 72/100
维护者通常 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 天内回复