Skip to content

Commit

Permalink
[cljs-analyzer2] don't self-require for macros
Browse files Browse the repository at this point in the history
If the namespace has :require-macros on itself, ClojureScript or
Shadow-cljs will load the Clojure namespace automatically. If not, we
don't need to look for macros in this namespace.
  • Loading branch information
xificurC authored and ggeoffrey committed Sep 4, 2024
1 parent 6027191 commit 7858fcb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/hyperfiddle/electric/impl/cljs_analyzer2.clj
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@
(when-not (find-var a sym ns$)
(-> (cond
(simple-symbol? sym)
(or (do (safe-require ns$) (some-> (find-ns ns$) (find-ns-var sym)))
(or (some-> (find-ns ns$) (find-ns-var sym))
(when-some [ref (-> a ::nses (get ns$) ::refers (get sym))] (safe-requiring-resolve ref))
(when-some [ref (-> a ::nses (get ns$) ::refer-macros (get sym))] (safe-requiring-resolve ref))
(when-not (get (-> a ::nses (get ns$) ::excludes) sym) (find-ns-var (find-ns 'clojure.core) sym)))
Expand Down

0 comments on commit 7858fcb

Please sign in to comment.