planck

Planck ClojureScript REPL
pyrmont 2019-04-16T00:16:49.022Z

@mfikes I'm looking at adding Error->map (http://cljs.github.io/api/cljs.repl/Error-GTmap) to planck.repl for use by the pREPL feature I'm working on. It looks to me like all of the functions in cljs.repl necessary for that function are implemented already in Planck's REPL code except for extract-canonical-stacktrace. The thing is that that function doesn't seem to be defined anywhere within ClojureScript itself. I noticed you'd added it to the official repo (https://github.com/clojure/clojurescript/commit/59997385d85e7e1af1559d599eb51fdb1d7e93b1) and wondered if you could help me understand it a bit better.

mfikes 2019-04-16T00:21:46.023Z

@mike858 That fn is already available to Planck. FWIW. (No need to port it, I'd guess.)

mfikes 2019-04-16T00:22:34.023500Z

It is indirectly used, for example here https://github.com/planck-repl/planck/blob/master/planck-cljs/src/planck/repl.cljs#L1579

mfikes 2019-04-16T00:23:03.023800Z

cljs.user=> cljs.repl/Error->map
#object[cljs$repl$Error__GT_map]

mfikes 2019-04-16T00:23:53.024700Z

So, in short, if you want to use it, just (require 'cljs.repl) and call it.

pyrmont 2019-04-16T00:24:07.025100Z

Ah. Got it.

pyrmont 2019-04-16T00:29:46.025900Z

Sweet! Output looks a lot nicer now :) Thanks!