diff --git a/deps.edn b/deps.edn index 1a40075b..01b1265d 100644 --- a/deps.edn +++ b/deps.edn @@ -19,7 +19,7 @@ "resources" "sci/resources"], :deps {org.clojure/clojure {:mvn/version "1.11.0"}, org.babashka/sci {:local/root "sci"} - org.babashka/babashka.impl.reify {:mvn/version "0.1.0"} + org.babashka/babashka.impl.reify {:mvn/version "0.1.1"} org.babashka/sci.impl.types {:mvn/version "0.0.2"} babashka/babashka.curl {:local/root "babashka.curl"} babashka/fs {:local/root "fs"} diff --git a/project.clj b/project.clj index e74c31ed..4f9225c7 100644 --- a/project.clj +++ b/project.clj @@ -26,7 +26,7 @@ [nrepl/bencode "1.1.0"] [borkdude/sci.impl.reflector "0.0.1"] [org.babashka/sci.impl.types "0.0.2"] - [org.babashka/babashka.impl.reify "0.1.0"] + [org.babashka/babashka.impl.reify "0.1.1"] [org.clojure/core.async "1.5.648"] [org.clojure/test.check "1.1.1"] [com.github.clj-easy/graal-build-time "0.1.0"] diff --git a/reify/build.clj b/reify/build.clj index 3b59ff57..acbece15 100644 --- a/reify/build.clj +++ b/reify/build.clj @@ -3,7 +3,7 @@ [clojure.tools.build.api :as b])) (def lib 'org.babashka/babashka.impl.reify) -(def version "0.1.0") +(def version "0.1.1") (def class-dir "target/classes") (def basis (b/create-basis {:project "deps.edn"})) (def jar-file (format "target/%s-%s.jar" (name lib) version)) diff --git a/reify/src/babashka/impl/reify2/interfaces.clj b/reify/src/babashka/impl/reify2/interfaces.clj index db5d5297..c92cddb0 100644 --- a/reify/src/babashka/impl/reify2/interfaces.clj +++ b/reify/src/babashka/impl/reify2/interfaces.clj @@ -27,4 +27,5 @@ java.util.function.Supplier java.lang.Comparable javax.net.ssl.X509TrustManager - clojure.lang.LispReader$Resolver]) + clojure.lang.LispReader$Resolver + sun.misc.SignalHandler]) diff --git a/src/babashka/impl/classes.clj b/src/babashka/impl/classes.clj index 3345dc3b..0b253df3 100644 --- a/src/babashka/impl/classes.clj +++ b/src/babashka/impl/classes.clj @@ -418,6 +418,8 @@ java.util.zip.ZipEntry java.util.zip.ZipException java.util.zip.ZipFile + sun.misc.Signal + sun.misc.SignalHandler ~(symbol "[B") ~(symbol "[I") ~(symbol "[Ljava.lang.Object;") diff --git a/src/babashka/impl/proxy.clj b/src/babashka/impl/proxy.clj index 1c0018d4..707ba250 100644 --- a/src/babashka/impl/proxy.clj +++ b/src/babashka/impl/proxy.clj @@ -74,6 +74,11 @@ (proxy [javax.net.ssl.HostnameVerifier] [] (verify [host-name session] ((method-or-bust methods 'verify) this host-name session))) + ["sun.misc.SignalHandler" #{}] + (proxy [sun.misc.SignalHandler] [] + (handle [sig] + ((method-or-bust methods 'handle) this sig))) + ["java.io.PipedInputStream" #{}] (proxy [java.io.PipedInputStream] [] (available [] ((method-or-bust methods 'available) this)) @@ -92,7 +97,9 @@ (flush [] ((method-or-bust methods 'flush) this)) (write ([b] ((method-or-bust methods 'write) this b)) - ([b off len] ((method-or-bust methods 'write) this b off len))))))) + ([b off len] ((method-or-bust methods 'write) this b off len)))) + , ;; keep this for merge friendliness + ))) (defn class-sym [c] (symbol (class-name c))) diff --git a/src/babashka/impl/reify.clj b/src/babashka/impl/reify.clj index a776651b..63dbf9e4 100644 --- a/src/babashka/impl/reify.clj +++ b/src/babashka/impl/reify.clj @@ -185,4 +185,7 @@ resolveAlias [[this sym]] resolveVar [[this sym]]} + sun.misc.SignalHandler + {handle [[this signal]]} + }))