Warn on clojure.spec.alpha
This commit is contained in:
parent
ef8e4f48b9
commit
76c9d633ff
1 changed files with 16 additions and 11 deletions
|
|
@ -716,17 +716,22 @@ Use bb run --help to show this help output.
|
||||||
_ (when jar
|
_ (when jar
|
||||||
(cp/add-classpath jar))
|
(cp/add-classpath jar))
|
||||||
load-fn (fn [{:keys [:namespace :reload]}]
|
load-fn (fn [{:keys [:namespace :reload]}]
|
||||||
(when-let [{:keys [:loader]}
|
(or (when-let [{:keys [:loader]}
|
||||||
@cp/cp-state]
|
@cp/cp-state]
|
||||||
(if ;; ignore built-in namespaces when uberscripting, unless with :reload
|
(if ;; ignore built-in namespaces when uberscripting, unless with :reload
|
||||||
(and uberscript
|
(and uberscript
|
||||||
(not reload)
|
(not reload)
|
||||||
(or (contains? namespaces namespace)
|
(or (contains? namespaces namespace)
|
||||||
(contains? sci-namespaces/namespaces namespace)))
|
(contains? sci-namespaces/namespaces namespace)))
|
||||||
""
|
""
|
||||||
(let [res (cp/source-for-namespace loader namespace nil)]
|
(let [res (cp/source-for-namespace loader namespace nil)]
|
||||||
(when uberscript (swap! uberscript-sources conj (:source res)))
|
(when uberscript (swap! uberscript-sources conj (:source res)))
|
||||||
res))))
|
res)))
|
||||||
|
(case namespace
|
||||||
|
clojure.spec.alpha
|
||||||
|
(binding [*out* *err*]
|
||||||
|
(println "[babashka] WARNING: Use the babashka-compatible version of clojure.spec.alpha, available here: https://github.com/babashka/spec.alpha"))
|
||||||
|
nil)))
|
||||||
main (if (and jar (not main))
|
main (if (and jar (not main))
|
||||||
(when-let [res (cp/getResource
|
(when-let [res (cp/getResource
|
||||||
(cp/loader jar)
|
(cp/loader jar)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue