clojure-emacs / clojure-emacs/refactor-nrepl

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

Open
#444 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Clojure
Stars
262
Forks
68
PR merge metrics
No merged PRs in 30d

Description

`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.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.