Skip to content
Snippets Groups Projects
Unverified Commit 80350ebd authored by Cam Saul's avatar Cam Saul Committed by GitHub
Browse files

Build script: make sure all orphan namespaces are compiled (#32540)

parent 94befd2e
No related branches found
No related tags found
No related merge requests found
......@@ -64,14 +64,20 @@
ns-decls))
(defn metabase-namespaces-in-topo-order [basis]
(let [ns-decls (mapcat
(comp ns.find/find-ns-decls-in-dir io/file)
(all-paths basis))
ns-symbols (set (map ns.parse/name-from-ns-decl ns-decls))]
(->> (dependencies-graph ns-decls)
ns.deps/topo-sort
(filter ns-symbols)
(cons 'metabase.bootstrap))))
(let [ns-decls (into []
(comp (map io/file)
(mapcat ns.find/find-ns-decls-in-dir))
(all-paths basis))
ns-symbols (into #{} (map ns.parse/name-from-ns-decl) ns-decls)
sorted (->> (dependencies-graph ns-decls)
ns.deps/topo-sort
(filter ns-symbols))
orphans (remove (set sorted) ns-symbols)
all (concat orphans sorted)]
(assert (contains? (set all) 'metabase.bootstrap))
(when (contains? ns-symbols 'metabase-enterprise.core)
(assert (contains? (set all) 'metabase-enterprise.core)))
all))
(defn compile-sources! [basis]
(u/step "Compile Clojure source files"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment