I’m seeing some issues with my shadow-cljs node REPL in Conjure where the result of an async evaluation (promise) somehow never completes (i.e. then/catch are not called). When running the same code in shadow-cljs node-repl
it works as expected.
So In the REPL described above I’m not getting any output for the following form:
(-> (p/delay 1000 :foox)
(p/then #(println "success" %))
(p/catch #(println "err" %)))
Is there a sort of debug mode that I could turn on in these kinds of situations? @olical
This just works fine:
(-> (p/promise 1)
(.then (fn [x] (js/console.log x))))
Oh, actually now it looks like the above (using p/delay
) also works but stdout is only printed in another connected shadow-cljs node-repl
instance not Conjure
I’m on master
btw
:thinking_face: can't say I've ever seen that....
Would you be able to raise an issue with a minimal repro for me? So odd that it's only in node
[Olical/conjure] Issue closed by Olical
[Olical/conjure] New release https://github.com/Olical/conjure/releases/tag/v4.19.0 published by Olical
I’ll try to reduce me repro a bit but yeah, I’ll try to open an issue :)
I upgrade a clj REPL with
(defn node-repl []
(shadow/node-repl {:config-merge [{:compiler-options {:reader-features #{:node}}}]}))
EDIT: code originally posted seems to work nowhm strange. It all seems to work with very basic promises but when I call the bigquery API (which returns an error in a promise) nothing ever happens
And I’m also not seeing the typical “async error not caught” warning that node usually emits