Fork me on GitHub
#dirac
<
2017-03-04
>
qqq23:03:33

Is there version number inflation going on here? I'm still on 1.1.6 and this is 1.2.0 🙂

qqq23:03:57

so in short: use

:external-config {:dirac.runtime/config {:nrepl-config {:reveal-url-script-path "scripts/reveal.sh" }}}
provide a reveal.sh shell script

darwin23:03:58

this is a new feature 🙂

qqq23:03:42

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

darwin23:03:53

you could use curl to do a HTTP post request and run with https://github.com/szarsti/chrome-emacsclient

qqq23:03:51

well first things first, while you're here, I should get it so that reaveal.sh echoes the path

qqq23:03:54

I can figure out emacs config later

darwin23:03:33

non-zero exit status will be reported as a failure, output printed to stderr will appear in devtools console

darwin23:03:50

you can use it for testing / debug printing

qqq23:03:13

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)

darwin23:03:00

how do you think it should work better?

qqq23:03:32

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.

darwin23:03:48

I think we have some deep misunderstanding here

darwin23:03:53

why should be cljs compiler running?

darwin23:03:16

the script’s responsibility is to open a file given an url, line and column as parameters

darwin23:03:30

script location is compile-time configuration

darwin23:03:40

because it does not change at runtime (dynamically)

darwin23:03:51

it is project-specific

darwin23:03:28

more specifically it is cljs-build-specific configuration

qqq23:03:40

ah, I get it now

qqq23:03:42

thanks 🙂

darwin23:03:14

that is why it is baked into runtime config, which configures nrepl-middleware for given REPL session

darwin23:03:41

in theory you could change it even dynamically, but after each change you have to open a new REPL session

qqq23:03:57

yeah, the nrepl is Handling it, not the compiler; the only reason it's in the compiler-options part is that

qqq23:03:04

the COMPILER ias PASSING it to nrepl

qqq23:03:10

my confusion was idiotic

darwin23:03:12

or you can have have single project, but multiple cljs-builds and each using a diffent reveal script

darwin23:03:28

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

darwin23:03:42

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

darwin23:03:10

I know this is complicated, but I cannot really make this simpler I’m afraid

darwin23:03:22

this is how nREPL stuff works, it is very flexible, but also very confusing

qqq23:03:46

I'll post a minimal build.boot once I get mine working