                  (or (map? requires)
                      (set? requires)) (contains? requires parent)
                  (vector? requires) (some #{(munge (name parent))} requires))))]
-     (util/topo-sort ns
+     (topo-sort ns
        (fn [ns']
          (set (map first (filter #(parent? ns' %) ns-map))))))))
 

    (when (and *analyze-deps* (seq uses))
      (check-uses uses env))
    (set! *cljs-ns* name)
    (when *load-macros*
      (load-core)
      (doseq [nsym (vals use-macros)]
        (let [k (or (:use-macros @reload)
                    (get-in @reloads [:use-macros nsym])
                    (and (= nsym name) *reload-macros* :reload))]
          (if k
            (clojure.core/require nsym k)
            (clojure.core/require nsym))
          (intern-macros nsym k)))
      (doseq [nsym (vals require-macros)]
        (let [k (or (:require-macros @reload)
                    (get-in @reloads [:require-macros nsym])
                    (and (= nsym name) *reload-macros* :reload))]
          (if k
            (clojure.core/require nsym k)
            (clojure.core/require nsym))
          (intern-macros nsym k)))
      (when (seq use-macros)
        (check-use-macros use-macros env)))
    (let [ns-info
          {:name name
           :doc (or docstring mdocstr)

    (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))))))

