conjure

:neovim:+:clj: https://github.com/Olical/conjure - If you're enjoying Conjure and want to say thanks: https://github.com/users/Olical/sponsorship :smile: (alt https://conjure.fun/discord)
martinklepsch 2021-05-15T08:55:47.161300Z

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.

martinklepsch 2021-05-17T14:48:13.168300Z

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

martinklepsch 2021-05-17T14:58:10.168500Z

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

martinklepsch 2021-05-18T20:03:30.001700Z

This just works fine:

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

martinklepsch 2021-05-18T20:04:49.001900Z

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

martinklepsch 2021-05-15T09:05:50.161500Z

I’m on master btw

Olical 2021-05-15T12:02:23.161900Z

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

Olical 2021-05-15T12:02:48.162100Z

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

2021-05-15T13:10:34.163100Z

2021-05-15T13:10:35.163200Z

[Olical/conjure] Issue closed by Olical

2021-05-15T13:10:39.163300Z

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

martinklepsch 2021-05-15T14:15:55.164200Z

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

martinklepsch 2021-05-15T15:33:32.164500Z

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

martinklepsch 2021-05-15T15:37:34.164800Z

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

martinklepsch 2021-05-15T15:38:14.165Z

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