0.8.0
Source-mapped REPL errors
In this release I focused on properly applying source maps to REPL eval requests. Also I improved the way how REPL code is generated and presented in the DevTools UI.
Additionally I started using binaryage/env-config library for dirac configuration overrides via environmental variables. Some environmental variables to override config keys changed. This might cause incompatibility with previous versions in case you used environment to configure your dirac. That is why I bumped release version to v0.8.0.
Make sure you are using Chrome Canary 56.0.2902+
Chrome devs decided to significantly change debugger protocol API. Make sure you are running the latest Canary with Dirac 0.8.x before you start banging your head against the wall.
REPL source maps
Let's see some screenshots from my recent Dirac REPL session:
As you can see each REPL session gets own "virtual" folder ~repl/<compiler-id>
with code snippets evaluated with that session and compiler. You can inspect generated javascript as well. The init.cljs
is special. That is the initial code executed after opening session. As you can see it requires for you doc
pp
and some other commands in cljs.user
namespace. If needed, you can redefine it here in Dirac's nREPL config.
Evaluating (+ 1 2)
was straightforward. You can see that each Javascript code to be evaluated is wrapped in a function which is passed to dirac.runtime.repl.eval
along with some other arguments controlling the evaluation. Runtime is (optionally) responsible for catching exceptions, capturing printed output, presenting results in cljs-devtools friendly way and also preparing nREPL response message.
Let's see the call of cljs.repl
function (doc filter)
:
We've got a bunch of generated code back. DevTools feature for reformatting Javascript source code is pretty handy here.
Let's see our session id, just to double-check that we are looking at correct files:
The command (dirac! :ls)
will list all nREPL sessions currently available. Indeed, we are the only session, our session id is 24c6c835
and we are using compiler dirac/24c6c835.1
which matches ~repl/dirac/24c6c835-1
virtual folder name.
And what if something goes wrong?
We get properly source-mapped error stack trace back. And it is even possible to click through dirac.runtime.repl
calls and inspect what exactly went wrong.
Rolling DevTools
Merged commits e3da2b6...6f8df8d from official DevTools.
Should work best with Chrome ~56.0.2905.2.
Links to matching Chromium snapshots: Mac | Linux_x64 | Win | Win_x64.
Notable commits
c1942e1 nrepl: generate source maps associated with REPL evaluation jobs
bbebe95 nrepl: produce better call-stacks and UI presentations of repl evals
d5fb0e5 runtime: prepare for more repl responsibilities
97c5b1a nrepl: move more responsibilities to runtime
5e18bd8 nrepl: update standard-repl-init-code to match cljs.repl
dd96ff8 agent: switch to env-config
76cc30f nrepl: switch to env-config
17ba84d runtime: switch to env-config
All new work: v0.7.5...v0.8.0