assert-single-alias in ns/rebuild.clj is dead code

未关闭
#444 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
45/100
Issue 类型
重构
描述清晰度
基本清楚
活跃度
冷清
技术栈
clojure
领域
tooling

调研方向

从 ns/rebuild.clj 中的 assert-single-alias 开始,然后检查它的调用方,以及当前传递 nil 或空字符串的 29 个测试。确定调用方是否应提供一个真实的 alias,或者该函数是否应明确地成为 no-op;更新所选的契约,移除临时的 clj-kondo 忽略,并确认测试套件通过。

由索引模型根据 Issue 内容生成。

描述

refactor-nrepl.ns.rebuild/assert-single-alias builds a for expression that throws on mismatched aliases, then discards the result and returns alias. Because for is lazy, the assertion never fires.

The kondo bump in #(this-PR) flagged it. The straightforward fix (doseq instead of for) makes the assertion fire and breaks 29 tests that rely on calling this with alias = nil or "". Need to figure out the intended contract — either make those callers pass a real alias, or change assert-single-alias to be a no-op explicitly (and drop the body).

For now there's a #_:clj-kondo/ignore to keep CI green.

主要语言
Clojure
星标
261
派生
68
平均合并
10 小时 36 分钟
30 天内合并 PR
8

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

clojure-emacs/refactor-nrepl 的其他 Issue

查看 clojure-emacs/refactor-nrepl 的全部 Issue

相似的 Issue

更多 Clojure Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。