-
-
Notifications
You must be signed in to change notification settings - Fork 90
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
async eval issues #748
Comments
@awb99 I need more information about how you are calling |
Ah, I managed to produce it like this: (deftest async-eval-load-clojure-ns2-test
(async done
(p/let [sci-ns (sci/create-ns 'my.lazy-ns)
lazy-ns {'my-lazy-fn (sci/copy-var my-lazy-loaded-fn sci-ns)}
ctx (sci/init {:async-load-fn
(fn [{:keys [libname opts ctx ns]}]
(js/Promise.resolve
(sci/add-namespace! ctx libname lazy-ns)
{}))})
code "
(ns foo1 (:require [my.lazy-ns]))
(my.lazy-ns/my-lazy-fn)
(ns foo2 (:require [my.lazy-ns :refer [my-lazy-fn]]))
(my-lazy-fn)
"
res (scia/eval-string* ctx code)]
(is (= :hello res))
(done)))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
version
master
problem
(ns example3 (:require [funny]))
(funny/joke)
(ns example4 (:require [funny :refer [joke]]))
(joke)
(ns example5 (:require [funny :as f]))
(f/joke)
all 3 examples work if I run them in a new sci context.
If I run all 3, then example4 fails with: "Could not resolve symbol: joke"
If I run just example3 + example4 then both work.
The text was updated successfully, but these errors were encountered: