@qqq => https://github.com/binaryage/dirac/blob/master/docs/faq.md#how-do-i-reveal-source-files-via-nrepl
Is there version number inflation going on here? I'm still on 1.1.6 and this is 1.2.0 ๐
so in short: use
:external-config {:dirac.runtime/config {:nrepl-config {:reveal-url-script-path "scripts/reveal.sh" }}}
provide a reveal.sh shell scriptthis is a new feature ๐
alright, let me figure out how to test this out, as reveal.sh is running on REMOTE machine, and i need to force it back to LOCAL-MBP
you could use curl to do a HTTP post request and run with https://github.com/szarsti/chrome-emacsclient
https://github.com/szarsti/chrome-emacsclient/blob/master/devtools.js#L13
well first things first, while you're here, I should get it so that reaveal.sh echoes the path
I can figure out emacs config later
non-zero exit status will be reported as a failure, output printed to stderr will appear in devtools console
you can use it for testing / debug printing
updated to 1.2.0;need to update build.boot can you briefly explain how https://github.com/binaryage/dirac-sample/blob/master/project.clj#L62 works ? the part that confuses me -- is how is it that "the script you should run on nrepl msg" a COMPILER option? it seems like something the dirac agetnt would control or something, yet it's emitted during COMPILE TIME? (weird since the compiler runs once, then it exists until next compile)
how do you think it should work better?
I don't know. The part that intuitively seems weird is (1) cljs compiler runs (2) cljs compiler exits (3) when this nrepl msg arrives, cljs compiler is most likely not running (4) yet, somehow this script was being called I guess if this was being controlled by figwhell or boot-repl, I'd be less surprised; but this is just my incorrect intuition.
I think we have some deep misunderstanding here
why should be cljs compiler running?
the scriptโs responsibility is to open a file given an url, line and column as parameters
script location is compile-time configuration
because it does not change at runtime (dynamically)
it is project-specific
more specifically it is cljs-build-specific configuration
ah, I get it now
thanks ๐
that is why it is baked into runtime config, which configures nrepl-middleware for given REPL session
in theory you could change it even dynamically, but after each change you have to open a new REPL session
yeah, the nrepl is Handling it, not the compiler; the only reason it's in the compiler-options part is that
the COMPILER ias PASSING it to nrepl
my confusion was idiotic
or you can have have single project, but multiple cljs-builds and each using a diffent reveal script
cljs compiler bakes that :reveal-url-script-path
into dirac.runtime.config, and dirac.runtime.config uses :nrepl-config to configure nREPL session on open
so you can have following situation nREPL server has a single nREPL dirac middleware, but multiple nREPL sessions to Dirac DevTools each configured with a different :reveal-url-script-path
I know this is complicated, but I cannot really make this simpler Iโm afraid
this is how nREPL stuff works, it is very flexible, but also very confusing
I'll post a minimal build.boot once I get mine working