Fork me on GitHub
#cider
<
2020-07-10
>
neilyio00:07:56

Alright here's a hard one. Has anyone figured out a way to evaluate "async" expressions? For example, I have load-image which returns a channel. I'd like to take! the value from this channel and evaluate the result, in a form like this (<! (load-image "/Users/neil/Desktop/stock-bg.jpg")). Of course, the problem is that Error: <! used not in (go...) block when I cider-eval-last-sexp.

dpsutton02:07:01

clj or cljs?

dpsutton02:07:29

in clj just (<!! ... in cljs, you'll need to actually do the go block or use one of the async functions that provide a callback

hugod20:07:08

When an exception is printed in the repl, it gets an overlay that makes it clickable to jump to the source of the frame. It seems broken to me as it fails to resolve a file. In cider-jump-to-locref-at-point either cider-sync-request:ns-path or cider-sync-request:info is returning an empty string, which means the loc plist is not checked for its “file”. Is this a bug in the middleware or in the elisp?

bozhidar18:07:51

Probably a bug in the middleware. Please, file a ticket about this.