fix test
This commit is contained in:
parent
3d4510f1ea
commit
c9c233ec32
2 changed files with 26 additions and 18 deletions
|
|
@ -150,7 +150,7 @@
|
||||||
(.applyTo ^clojure.lang.IFn f args)))))
|
(.applyTo ^clojure.lang.IFn f args)))))
|
||||||
|
|
||||||
;; orchestra is going to override this
|
;; orchestra is going to override this
|
||||||
(def spec-checking-fn-var (sci/copy-var spec-checking-fn* tns))
|
(def spec-checking-fn-var (sci/new-var 'spec-checking-fn spec-checking-fn* {:ns tns}))
|
||||||
|
|
||||||
(defn- no-fspec
|
(defn- no-fspec
|
||||||
[v spec]
|
[v spec]
|
||||||
|
|
|
||||||
|
|
@ -887,7 +887,7 @@ Use bb run --help to show this help output.
|
||||||
_ (vreset! common/ctx sci-ctx)
|
_ (vreset! common/ctx sci-ctx)
|
||||||
_ (when-let [pods (:pods @common/bb-edn)]
|
_ (when-let [pods (:pods @common/bb-edn)]
|
||||||
(when-let [pod-metadata (pods/load-pods-metadata
|
(when-let [pod-metadata (pods/load-pods-metadata
|
||||||
pods {:download-only (download-only?)})]
|
pods {:download-only (download-only?)})]
|
||||||
(vreset! pod-namespaces pod-metadata)))
|
(vreset! pod-namespaces pod-metadata)))
|
||||||
preloads (some-> (System/getenv "BABASHKA_PRELOADS") (str/trim))
|
preloads (some-> (System/getenv "BABASHKA_PRELOADS") (str/trim))
|
||||||
[expressions exit-code]
|
[expressions exit-code]
|
||||||
|
|
@ -1128,23 +1128,31 @@ Use bb run --help to show this help output.
|
||||||
|
|
||||||
;;;; Scratch
|
;;;; Scratch
|
||||||
|
|
||||||
(defn where-am-i [depth]
|
(defmacro in-native-image-or-aot
|
||||||
(let [ks [:fileName :lineNumber :className]]
|
[& body]
|
||||||
(clojure.pprint/print-table
|
`(when (or (System/getProperty "org.graalvm.nativeimage.kind")
|
||||||
ks
|
(System/getProperty "com.oracle.graalvm.isaot"))
|
||||||
(map (comp #(select-keys % ks) bean)
|
~@body))
|
||||||
(take depth (.getStackTrace (Thread/currentThread)))))))
|
|
||||||
|
|
||||||
(alter-var-root #'require
|
(in-native-image-or-aot
|
||||||
(fn [_old-req]
|
|
||||||
(fn [& args]
|
|
||||||
(prn :require-args args)
|
|
||||||
(System/exit 1))))
|
|
||||||
|
|
||||||
(alter-var-root #'requiring-resolve
|
#_(defn where-am-i [depth]
|
||||||
(fn [_old-req]
|
(let [ks [:fileName :lineNumber :className]]
|
||||||
(fn [& args]
|
(clojure.pprint/print-table
|
||||||
(prn :requiring-resolve-args args)
|
ks
|
||||||
(System/exit 1))))
|
(map (comp #(select-keys % ks) bean)
|
||||||
|
(take depth (.getStackTrace (Thread/currentThread)))))))
|
||||||
|
|
||||||
|
(alter-var-root #'require
|
||||||
|
(fn [_old-req]
|
||||||
|
(fn [& args]
|
||||||
|
(prn :require-args args)
|
||||||
|
(System/exit 1))))
|
||||||
|
|
||||||
|
(alter-var-root #'requiring-resolve
|
||||||
|
(fn [_old-req]
|
||||||
|
(fn [& args]
|
||||||
|
(prn :requiring-resolve-args args)
|
||||||
|
(System/exit 1)))))
|
||||||
|
|
||||||
(comment)
|
(comment)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue