Skip to content

Let magic requires take an alias with dots - #4223

Open
bbatsov wants to merge 1 commit into
masterfrom
dotted-aliases
Open

bbatsov wants to merge 1 commit into
masterfrom
dotted-aliases

Conversation

@bbatsov

@bbatsov bbatsov commented Oct 28, 2026

Copy link
Copy Markdown
Member

A slash after a dotted token never counted, which left out aliases like utils.strings. A namespace name such as clojure.string reads the same, so it now goes through the lookup too and comes back empty. That's a quick round trip, since the REPL checks for a loaded namespace first.

Fixes #4221

Clojure allows an alias like utils.strings, but the slash only counted
after a token without dots, so that no namespace name (clojure.string/)
would trigger a lookup. The two read the same, though. A token with dots
now counts as long as no segment is capitalized, which still rules out a
class name. A namespace name goes through the lookup but finds nothing,
as the REPL skips the names of loaded namespaces and nothing in the
project uses one as an alias.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Magic requires don't trigger for aliases that contain dots

1 participant