(macro-autoload-ns? form)
Given a spec form check whether the spec namespace requires a macro file
of the same name. If so return true.
Source
(defn macro-autoload-ns?
"Given a spec form check whether the spec namespace requires a macro file
of the same name. If so return true."
#?(:cljs {:tag boolean})
[form]
(when *macro-infer*
(let [ns (if (sequential? form) (first form) form)
{:keys [use-macros require-macros]}
(or (get-in @env/*compiler* [::namespaces ns])
#?(:clj
(when-let [res (util/ns->source ns)]
(:ast (parse-ns res)))))]
(or (some #{ns} (vals use-macros))
(some #{ns} (vals require-macros))))))