cljs-dev 2024-05-14

I have another bug report for an issue I found awhile ago and finally got around to recreating with vanilla ClojureScript (originally found using shadow-cljs).

(ns macro-repl-bug
  #?(:cljs (:require-macros [macro-repl-bug])))


(defn foo
  []
  :foo)


#?(:clj
   (defmacro bar
     []
     :bar))
Including this namespace in :preloads doesn't make the macro macro-repl-bug/bar available. Requiring it explicitly from a namespace or REPL does make the macro available. Full reproduction + details here: https://github.com/lilactown/macro-repl-bug It seems to be an issue specifically with single-part namespaces. @thheller added some details to the original issue I opened with #shadow-cljs that points to the specific lines of code in the cljs analyzer: https://github.com/thheller/shadow-cljs/issues/1167#issuecomment-1859071097