   (cond
     (nil? cljs.env/*compiler*) changed-ns-syms'
     (false? (:recompile-dependents state))
-    (union (keep (fn [n] (:name (ana-api/find-ns n))) changed-ns-syms')
-           (find-figwheel-always))
+    (topo-sort
+     (reverse (union (keep (fn [n] (:name (ana-api/find-ns n))) changed-ns-syms')
+                     (find-figwheel-always))))
+
     :else
     (let [changed-ns-syms       (set (keep (fn [n] (:name (ana-api/find-ns n))) changed-ns-syms'))
           dependants            (set (mapcat

  ;; this is the new way where if additional changes are needed they
  ;; are made explicitely
  ([state old-mtimes new-mtimes additional-ns]
   (binding [*transitive-dep-cache* (atom {})]
     (notify-cljs-ns-changes state
       (set (concat additional-ns
                    (keep get-ns-from-source-file-path

                     (if (target-file-changed? state nm) true false)))
        ns-syms))

(defn find-figwheel-always []
  (set (filter (fn [n] (-> n meta :figwheel-always)) (ana-api/all-ns))))

