Skip to content

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

Description

@bbatsov

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions