load-pod returns nil for now
This commit is contained in:
parent
f5652b9749
commit
630161441b
5 changed files with 8 additions and 7 deletions
|
|
@ -11,4 +11,5 @@
|
||||||
(dosync (commute @#'clojure.core/*loaded-libs* conj ns-sym)))
|
(dosync (commute @#'clojure.core/*loaded-libs* conj ns-sym)))
|
||||||
(doseq [[var-sym v] v]
|
(doseq [[var-sym v] v]
|
||||||
(intern ns-sym var-sym v)))
|
(intern ns-sym var-sym v)))
|
||||||
(future (impl/processor pod)))))
|
(future (impl/processor pod))
|
||||||
|
nil)))
|
||||||
|
|
|
||||||
|
|
@ -13,5 +13,6 @@
|
||||||
namespaces (:namespaces pod)
|
namespaces (:namespaces pod)
|
||||||
env (:env ctx)]
|
env (:env ctx)]
|
||||||
(swap! env update :namespaces merge namespaces)
|
(swap! env update :namespaces merge namespaces)
|
||||||
(sci/future (impl/processor pod)))))
|
(sci/future (impl/processor pod))
|
||||||
|
nil)))
|
||||||
{:sci.impl/op :needs-ctx}))
|
{:sci.impl/op :needs-ctx}))
|
||||||
|
|
|
||||||
|
|
@ -15,5 +15,5 @@
|
||||||
6
|
6
|
||||||
[1 2 3 4 5 6 7 8 9]
|
[1 2 3 4 5 6 7 8 9]
|
||||||
"Illegal arguments / {:args (1 2 3)}"] ret))
|
"Illegal arguments / {:args (1 2 3)}"] ret))
|
||||||
(is (= "(\"hello\" \"print\" \"this\" \"debugging\" \"message\")\n" (str out)))
|
(is (= "nil\n(\"hello\" \"print\" \"this\" \"debugging\" \"message\")\n" (str out)))
|
||||||
(is (= "(\"hello\" \"print\" \"this\" \"error\")\n" (str err)))))
|
(is (= "(\"hello\" \"print\" \"this\" \"error\")\n" (str err)))))
|
||||||
|
|
|
||||||
|
|
@ -21,5 +21,5 @@
|
||||||
6
|
6
|
||||||
[1 2 3 4 5 6 7 8 9]
|
[1 2 3 4 5 6 7 8 9]
|
||||||
"Illegal arguments / {:args (1 2 3)}"] ret))
|
"Illegal arguments / {:args (1 2 3)}"] ret))
|
||||||
(is (= "(\"hello\" \"print\" \"this\" \"debugging\" \"message\")\n" (str out)))
|
(is (= "nil\n(\"hello\" \"print\" \"this\" \"debugging\" \"message\")\n" (str out)))
|
||||||
(is (= "(\"hello\" \"print\" \"this\" \"error\")\n" (str err)))))
|
(is (= "(\"hello\" \"print\" \"this\" \"error\")\n" (str err)))))
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,10 @@
|
||||||
(ns babashka.pods.test-common)
|
(ns babashka.pods.test-common)
|
||||||
|
|
||||||
(def test-program
|
(def test-program "
|
||||||
"
|
|
||||||
(require '[babashka.pods :as pods])
|
(require '[babashka.pods :as pods])
|
||||||
(require '[clojure.core.async :as async])
|
(require '[clojure.core.async :as async])
|
||||||
|
|
||||||
(pods/load-pod [\"clojure\" \"-A:test-pod\"])
|
(prn (pods/load-pod [\"clojure\" \"-A:test-pod\"])) ;; should return nil
|
||||||
(require '[pod.test-pod :as pod])
|
(require '[pod.test-pod :as pod])
|
||||||
(def stream-results (atom []))
|
(def stream-results (atom []))
|
||||||
(let [chan (pod.test-pod/range-stream 1 10)]
|
(let [chan (pod.test-pod/range-stream 1 10)]
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue