Fork me on GitHub
#conjure
<
2021-05-15
>
martinklepsch08:05:47

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.

martinklepsch09:05:50

I’m on master btw

Olical12:05:23

:thinking_face: can't say I've ever seen that....

Olical12:05:48

Would you be able to raise an issue with a minimal repro for me? So odd that it's only in node

martinklepsch14:05:55

I’ll try to reduce me repro a bit but yeah, I’ll try to open an issue :)

martinklepsch15:05:32

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 now

martinklepsch15:05:34

hm 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

martinklepsch15:05:14

And I’m also not seeing the typical “async error not caught” warning that node usually emits

martinklepsch14:05:13

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" %)))

martinklepsch14:05:10

Is there a sort of debug mode that I could turn on in these kinds of situations? @U38J3881W

martinklepsch20:05:30

This just works fine:

(-> (p/promise 1)
     (.then (fn [x] (js/console.log x))))

martinklepsch20:05:49

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

GitHub13:05:35

[Olical/conjure] Issue closed by Olical

GitHub13:05:39

[Olical/conjure] New release https://github.com/Olical/conjure/releases/tag/v4.19.0 published by Olical