Eftest compatibility (#1470)
This commit is contained in:
parent
77878631e9
commit
0be3c71772
7 changed files with 18 additions and 9 deletions
2
deps.edn
2
deps.edn
|
|
@ -20,7 +20,7 @@
|
|||
"reify/src"],
|
||||
:deps {org.clojure/clojure {:mvn/version "1.11.1"},
|
||||
org.babashka/sci {:local/root "sci"}
|
||||
org.babashka/babashka.impl.reify {:mvn/version "0.1.4-tab-compat"}
|
||||
org.babashka/babashka.impl.reify {:mvn/version "0.1.5"}
|
||||
org.babashka/sci.impl.types {:mvn/version "0.0.2"}
|
||||
babashka/babashka.curl {:local/root "babashka.curl"}
|
||||
babashka/fs {:local/root "fs"}
|
||||
|
|
|
|||
|
|
@ -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.4-tab-compat"]
|
||||
[org.babashka/babashka.impl.reify "0.1.5"]
|
||||
[org.clojure/core.async "1.6.673"]
|
||||
[org.clojure/test.check "1.1.1"]
|
||||
[com.github.clj-easy/graal-build-time "0.1.0"]
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
[clojure.tools.build.api :as b]))
|
||||
|
||||
(def lib 'org.babashka/babashka.impl.reify)
|
||||
(def version "0.1.4-tab-compat")
|
||||
(def version "0.1.5")
|
||||
(def class-dir "target/classes")
|
||||
(def basis (b/create-basis {:project "deps.edn"}))
|
||||
(def jar-file (format "target/%s-%s.jar" (name lib) version))
|
||||
|
|
|
|||
|
|
@ -33,4 +33,5 @@
|
|||
clojure.lang.LispReader$Resolver
|
||||
sun.misc.SignalHandler
|
||||
java.util.concurrent.ThreadFactory
|
||||
java.lang.Thread$UncaughtExceptionHandler])
|
||||
java.lang.Thread$UncaughtExceptionHandler
|
||||
java.util.concurrent.Callable])
|
||||
|
|
|
|||
|
|
@ -394,10 +394,12 @@
|
|||
java.util.concurrent.atomic.AtomicInteger
|
||||
java.util.concurrent.atomic.AtomicLong
|
||||
java.util.concurrent.atomic.AtomicReference
|
||||
java.util.concurrent.Callable
|
||||
java.util.concurrent.CancellationException
|
||||
java.util.concurrent.CompletionException
|
||||
java.util.concurrent.ExecutionException
|
||||
java.util.concurrent.Executor
|
||||
java.util.concurrent.ExecutorService
|
||||
java.util.concurrent.BlockingQueue
|
||||
java.util.concurrent.ArrayBlockingQueue
|
||||
java.util.concurrent.LinkedBlockingQueue
|
||||
|
|
@ -666,6 +668,7 @@
|
|||
BigInteger java.math.BigInteger
|
||||
Boolean java.lang.Boolean
|
||||
Byte java.lang.Byte
|
||||
Callable java.util.concurrent.Callable
|
||||
Character java.lang.Character
|
||||
CharSequence java.lang.CharSequence
|
||||
Class java.lang.Class
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
(ns babashka.impl.repl
|
||||
{:no-doc true}
|
||||
(:require
|
||||
[babashka.impl.clojure.main :as m]
|
||||
[babashka.impl.clojure.core :as core-extras]
|
||||
[babashka.impl.clojure.main :as m]
|
||||
[clojure.java.io :as io]
|
||||
[clojure.string :as str]
|
||||
[clojure.tools.reader.reader-types :as r]
|
||||
|
|
|
|||
|
|
@ -352,6 +352,8 @@ Use bb run --help to show this help output.
|
|||
|
||||
(def sci-ns (sci/create-ns 'sci.core))
|
||||
|
||||
(def main-var (sci/new-var 'main nil {:ns clojure-main-ns}))
|
||||
|
||||
(def namespaces
|
||||
(cond->
|
||||
{'user {'*input* (reify
|
||||
|
|
@ -378,7 +380,9 @@ Use bb run --help to show this help output.
|
|||
(fn [& opts]
|
||||
(let [opts (apply hash-map opts)]
|
||||
(repl/start-repl! (common/ctx) opts))) {:ns clojure-main-ns})
|
||||
'with-bindings (sci/copy-var clojure-main/with-bindings clojure-main-ns)}
|
||||
'with-bindings (sci/copy-var clojure-main/with-bindings clojure-main-ns)
|
||||
'repl-caught (sci/copy-var repl/repl-caught clojure-main-ns)
|
||||
'main main-var}
|
||||
'clojure.test t/clojure-test-namespace
|
||||
'clojure.math math-namespace
|
||||
'babashka.classpath classpath-namespace
|
||||
|
|
@ -1056,7 +1060,7 @@ Use bb run --help to show this help output.
|
|||
(and (= minor-current minor-min)
|
||||
(>= patch-current patch-min)))))))
|
||||
|
||||
(defn load-bb-edn [string]
|
||||
(defn read-bb-edn [string]
|
||||
(try (edn/read-string {:default tagged-literal} string)
|
||||
(catch java.lang.RuntimeException e
|
||||
(if (re-find #"No dispatch macro for: \"" (.getMessage e))
|
||||
|
|
@ -1079,9 +1083,9 @@ Use bb run --help to show this help output.
|
|||
bb-edn (when (or bb-edn-file merge-deps)
|
||||
(when bb-edn-file (System/setProperty "babashka.config" bb-edn-file))
|
||||
(let [raw-string (when bb-edn-file (slurp bb-edn-file))
|
||||
edn (when bb-edn-file (load-bb-edn raw-string))
|
||||
edn (when bb-edn-file (read-bb-edn raw-string))
|
||||
edn (if merge-deps
|
||||
(deps/merge-deps [edn (load-bb-edn merge-deps)])
|
||||
(deps/merge-deps [edn (read-bb-edn merge-deps)])
|
||||
edn)
|
||||
edn (assoc edn
|
||||
:raw raw-string
|
||||
|
|
@ -1137,6 +1141,7 @@ Use bb run --help to show this help output.
|
|||
(let [exit-code (run args)]
|
||||
(System/exit exit-code))))
|
||||
|
||||
(sci/alter-var-root main-var (constantly -main))
|
||||
;;;; Scratch
|
||||
|
||||
(comment)
|
||||
|
|
|
|||
Loading…
Reference in a new issue