[nop] Changes for dependency bumps
This commit is contained in:
parent
7953751eba
commit
e864294321
3 changed files with 23 additions and 21 deletions
|
|
@ -28,7 +28,9 @@
|
||||||
(let [graalvm-home (System/getenv "GRAALVM_HOME")
|
(let [graalvm-home (System/getenv "GRAALVM_HOME")
|
||||||
bin-dir (str (fs/file graalvm-home "bin"))]
|
bin-dir (str (fs/file graalvm-home "bin"))]
|
||||||
(shell (executable bin-dir "gu") "install" "native-image")
|
(shell (executable bin-dir "gu") "install" "native-image")
|
||||||
(shell (executable bin-dir "native-image") "-jar" "target/graal-tests.jar" "--no-fallback" "graal_tests")))
|
(shell (executable bin-dir "native-image")
|
||||||
|
"--features=clj_easy.graal_build_time.InitClojureClasses"
|
||||||
|
"--no-fallback" "-jar" "target/graal-tests.jar" "graal_tests")))
|
||||||
|
|
||||||
(defn run-tests []
|
(defn run-tests []
|
||||||
(let [{:keys [out]} (shell {:out :string} (executable "." "graal_tests"))]
|
(let [{:keys [out]} (shell {:out :string} (executable "." "graal_tests"))]
|
||||||
|
|
|
||||||
|
|
@ -25,7 +25,7 @@
|
||||||
PersistentQueue PersistentTreeMap PersistentTreeSet PersistentList
|
PersistentQueue PersistentTreeMap PersistentTreeSet PersistentList
|
||||||
LazySeq IRecord ISeq IType]))
|
LazySeq IRecord ISeq IType]))
|
||||||
|
|
||||||
(enc/assert-min-encore-version [3 58 0])
|
(enc/assert-min-encore-version [3 67 0])
|
||||||
|
|
||||||
(comment
|
(comment
|
||||||
(set! *unchecked-math* :warn-on-boxed)
|
(set! *unchecked-math* :warn-on-boxed)
|
||||||
|
|
@ -471,8 +471,8 @@
|
||||||
(or
|
(or
|
||||||
(when-let [s
|
(when-let [s
|
||||||
(or
|
(or
|
||||||
(do (enc/get-sys-val (get-in ids [action :base :prop]) (get-in ids [action :base :env])))
|
(do (enc/get-sys-val* (get-in ids [action :base :prop]) (get-in ids [action :base :env])))
|
||||||
(when incl-legacy? (enc/get-sys-val (get-in ids [:legacy :base :prop]) (get-in ids [:legacy :base :env]))))]
|
(when incl-legacy? (enc/get-sys-val* (get-in ids [:legacy :base :prop]) (get-in ids [:legacy :base :env]))))]
|
||||||
|
|
||||||
(if (allow-and-record? s) s (split-class-names>set s)))
|
(if (allow-and-record? s) s (split-class-names>set s)))
|
||||||
default)
|
default)
|
||||||
|
|
@ -480,8 +480,8 @@
|
||||||
allowlist-add
|
allowlist-add
|
||||||
(when-let [s
|
(when-let [s
|
||||||
(or
|
(or
|
||||||
(do (enc/get-sys-val (get-in ids [action :add :prop]) (get-in ids [action :add :env])))
|
(do (enc/get-sys-val* (get-in ids [action :add :prop]) (get-in ids [action :add :env])))
|
||||||
(when incl-legacy? (enc/get-sys-val (get-in ids [:legacy :add :prop]) (get-in ids [:legacy :add :env]))))]
|
(when incl-legacy? (enc/get-sys-val* (get-in ids [:legacy :add :prop]) (get-in ids [:legacy :add :env]))))]
|
||||||
|
|
||||||
(if (allow-and-record? s) s (split-class-names>set s)))]
|
(if (allow-and-record? s) s (split-class-names>set s)))]
|
||||||
|
|
||||||
|
|
@ -547,8 +547,8 @@
|
||||||
Upgrading from an older version of Nippy and unsure whether you've been
|
Upgrading from an older version of Nippy and unsure whether you've been
|
||||||
using Nippy's Serializable support, or which classes to allow? See [2].
|
using Nippy's Serializable support, or which classes to allow? See [2].
|
||||||
|
|
||||||
See also `taoensso.encore/compile-str-filter` for a util to help easily
|
See also `taoensso.encore/name-filter` for a util to help easily build
|
||||||
build more advanced predicate functions.
|
more advanced predicate functions.
|
||||||
|
|
||||||
Thanks to Timo Mihaljov (@solita-timo-mihaljov) for an excellent report
|
Thanks to Timo Mihaljov (@solita-timo-mihaljov) for an excellent report
|
||||||
identifying this vulnerability.
|
identifying this vulnerability.
|
||||||
|
|
@ -649,7 +649,7 @@
|
||||||
(fn [x]
|
(fn [x]
|
||||||
(if (allow-and-record? x)
|
(if (allow-and-record? x)
|
||||||
allow-and-record-any-serializable-class-unsafe
|
allow-and-record-any-serializable-class-unsafe
|
||||||
(enc/compile-str-filter x))))
|
(enc/name-filter x))))
|
||||||
|
|
||||||
conform?* (fn [x cn] ((compile x) cn)) ; Uncached because input domain possibly infinite
|
conform?* (fn [x cn] ((compile x) cn)) ; Uncached because input domain possibly infinite
|
||||||
conform?
|
conform?
|
||||||
|
|
|
||||||
|
|
@ -9,17 +9,17 @@
|
||||||
;; Unfortunately the only ~reliable way we can tell if something's
|
;; Unfortunately the only ~reliable way we can tell if something's
|
||||||
;; really serializable/readable is to actually try a full roundtrip.
|
;; really serializable/readable is to actually try a full roundtrip.
|
||||||
|
|
||||||
(let [swap-cache! enc/-swap-val!]
|
(defn- memoize-type-test [test-fn]
|
||||||
(defn- memoize-type-test [test-fn]
|
(let [cache_ (enc/latom {})] ; {<type> <type-okay?>}
|
||||||
(let [cache (atom {})] ; {<type> <type-okay?>}
|
(fn [x]
|
||||||
(fn [x]
|
(let [t (type x)
|
||||||
(let [t (type x)
|
gensym? (re-find #"__\d+" (str t))
|
||||||
;; This is a bit hackish, but no other obvious solutions (?):
|
cacheable? (not gensym?) ; Hack, but no obviously better solutions
|
||||||
cacheable? (not (re-find #"__\d+" (str t))) ; gensym form
|
test (fn [] (try (test-fn x) (catch Exception _ false)))]
|
||||||
test (fn [] (try (test-fn x) (catch Exception _ false)))]
|
|
||||||
(if cacheable?
|
(if cacheable?
|
||||||
@(swap-cache! cache t #(if % % (delay (test))))
|
@(cache_ t #(if % % (delay (test))))
|
||||||
(test)))))))
|
(do (test)))))))
|
||||||
|
|
||||||
(def readable? (memoize-type-test (fn [x] (-> x enc/pr-edn enc/read-edn) true)))
|
(def readable? (memoize-type-test (fn [x] (-> x enc/pr-edn enc/read-edn) true)))
|
||||||
(def serializable?
|
(def serializable?
|
||||||
|
|
@ -53,7 +53,7 @@
|
||||||
(serializable? "Hello world") ; Cacheable
|
(serializable? "Hello world") ; Cacheable
|
||||||
(readable? (fn [])) ; Uncacheable
|
(readable? (fn [])) ; Uncacheable
|
||||||
(serializable? (fn [])) ; Uncacheable
|
(serializable? (fn [])) ; Uncacheable
|
||||||
)) ; [5.65 5.88 1129.46 1.4]
|
)) ; [2.52 2.53 521.34 0.63]
|
||||||
|
|
||||||
;;;;
|
;;;;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue