@superstructor: I deployed https://clojars.org/powerlaces/boot-cljs-devtools, can you give it a good as well please? version 0.1.1-SNAPSHOT
how was the shortcut to activate Dirac again? CTRL-PGUP ?
oh sorry I was using the standard panel all good
how can you evaluate forms? I pressing enter and it just adds a new line
no, it looks like evaluation does not work
@richiardiandrea: next version of dirac will support :preloads
in the same way as cljs-devtools does
just need to push cljs-devtools v0.8 out and then focus on dirac polishing
@darwin I was trying to evaluate a form in Dirac but it was always adding a new line
both with and without Parinfer enabled
are you sure you were in dirac prompt? (green-ish background)
yeah there was a cljs.user
green string showing up
ok, then follow this to see errors in dirac console: https://github.com/binaryage/dirac/blob/master/docs/faq.md#something-broke-how-do-i-debug-dirac-devtools-frontend
there should be some
or I can tell you how to enable verbose mode in nREPL middleware / dirac’s weasel server, so you can see if the eval command was really received by REPL backend and compiled and sent back to frontend for evaluation
when it does like this in clojurescript it means that it cannot parse the input form..
I can try to enable verbose mode, I am using boot-cljs-devtools
btw
set env variable DIRAC_NREPL_LOG_LEVEL to “DEBUG” before launching your nrepl server
https://github.com/binaryage/dirac/blob/master/src/nrepl/dirac/nrepl/config.clj#L6
k
or pass that config explicitely via boot (more advanced)
export DIRAC_NREPL_LOG_LEVEL=DEBUG; boot cider dev
is easy enough 😉
sure
there is also: https://github.com/binaryage/dirac/blob/master/src/agent/dirac/agent/config.clj#L19
and :weasel-verbose in runtime config: https://github.com/binaryage/dirac/blob/master/src/runtime/dirac/runtime/prefs.cljs#L13
booting
weasel is the component responsible for evaluating compiled clojurescript sent from nrepl server back to client
DIRAC_WEASEL_VERBOSE is also env var which could be set: https://github.com/binaryage/dirac/blob/master/src/runtime/dirac/runtime/prefs.clj#L34
uhm not really more verbose...
is boot cider dev
really starting nrepl server?
yeah
Compiling {sass}... 2 changed files.
Adding :require adzerk.boot-reload.init10338 to main.cljs.edn...
nREPL server started on port 5088 on host 127.0.0.1 - <nrepl://127.0.0.1:5088>
Adding :require [devtools.core dirac.runtime] and :init-fns [devtools.core/install! dirac.runtime/install!] to main.cljs.edn...
Compiling ClojureScript...
• main.js
Dirac Agent v0.6.2
Connected to nREPL server at <nrepl://localhost:5088>.
Agent is accepting connections at <ws://localhost:8231>.
Elapsed time: 28.075 sec
hmm, looking into that
btw I moved the repo to https://github.com/boot-clj/boot-cljs-devtools
set both DIRAC_AGENT_LOG_LEVEL=debug DIRAC_NREPL_LOG_LEVEL=debug
it looks DIRAC_NREPL_LOG_LEVEL does not work for some reason or is not used (or it starts logging after dirac frontend connection or something)
I don’t remember the details
k
changed both env vars to “all” and this is my output for evaluation form (+ 1 2)
:
https://gist.github.com/darwin/d75e8cba060b5765aaff14dc2df1613f
wow, I don't see any of that
so maybe your boot task does not propagate env variables to spawned subprocesses?
I’m using the environ
library
it can be that, I think the task was originally built using the repl
built-in task which I think executes in a pod
so I cannot debug...but without env vars I cannot evaluate as well?
no, you should be able to eval just fine
env vars are just alternative way how to configure dirac
in our specific case, we wanted enable verbose logging to see what is going on
this should be fixed in your boot task anyways, users should be able to configure dirac via env vars
all dirac env vars have DIRAC_
prefix if it helps
can you share the project? I could try to reproduce it here
wait, Chrome 50.x?
you must be using Canary, they did a lot of changes in devtools recently, v50 is too old
oh
lemme update
Chrome Canary is currently not available on the linux platform.
You can try Chrome Canary for Windows 32-bit, Windows 64-bit or OSX.
bad luck
it was 😉
google-chrome-unstable should work
https://github.com/binaryage/dirac/blob/master/.travis.yml#L16-L19
trying
unfortunately bleeding edge version of devtools was pretty broken over last 14 days or so - they are adding support for node.js debugging announced on Google I/O
Version 54.0.2810.2 dev (64-bit)
oh wow cool stuff
i mean the node.js debugging
yeah
Internal Dirac Error: DevTools code has thrown an unhandled exception
TypeError: Cannot read property 'shift' of undefined
at WebInspector.ConsoleView._alterDiracViewMessage (<chrome-extension://kbkdngfljkchidcjpnfcgcokkbhlkogi/devtools/front_end/console_module.js:398:137>)
at WebInspector.ConsoleView._createViewMessage (<chrome-extension://kbkdngfljkchidcjpnfcgcokkbhlkogi/devtools/front_end/console_module.js:406:133>)
at WebInspector.ConsoleView._addConsoleMessage (<chrome-extension://kbkdngfljkchidcjpnfcgcokkbhlkogi/devtools/front_end/console_module.js:384:131>)
at WebInspector.ConsoleView._onConsoleMessageAdded (<chrome-extension://kbkdngfljkchidcjpnfcgcokkbhlkogi/devtools/front_end/console_module.js:380:32>)
at WebInspector.MultitargetConsoleModel.dispatchEventToListeners (<chrome-extension://kbkdngfljkchidcjpnfcgcokkbhlkogi/devtools/front_end/inspector.js:772:185>)
at WebInspector.MultitargetConsoleModel._consoleMessageAdded (<chrome-extension://kbkdngfljkchidcjpnfcgcokkbhlkogi/devtools/front_end/inspector.js:4613:7>)
at WebInspector.ConsoleModel.dispatchEventToListeners (<chrome-extension://kbkdngfljkchidcjpnfcgcokkbhlkogi/devtools/front_end/inspector.js:772:185>)
at WebInspector.ConsoleModel.addMessage (<chrome-extension://kbkdngfljkchidcjpnfcgcokkbhlkogi/devtools/front_end/inspector.js:4542:97>)
at WebInspector.DiracAwareConsoleDispatcher.messageAdded (<chrome-extension://kbkdngfljkchidcjpnfcgcokkbhlkogi/devtools/front_end/inspector.js:4596:311>)
at WebInspector.DiracAwareConsoleDispatcher.messageAdded (<chrome-extension://kbkdngfljkchidcjpnfcgcokkbhlkogi/devtools/front_end/inspector.js:4604:55>)
at least now we have an error
ok, this one was already reported by superstructor here in the channel, didn’t have time to look into that yet
ok no problem, at least now it evaluates it
Darwin thanks for your support and we discovered the env-var bug in boot-cljs-devtools
😉
I will open an issue with the above, I don't see it
yep, that should get fixed when you get time to dig into that, thanks
no hurry, time is limited, we try our best 😄
btw, the exception you are getting is from here: https://github.com/binaryage/dirac/blob/master/resources/unpacked/devtools/front_end/console/ConsoleView.js#L721
what was the form you tried to eval?
(println "test")
but any form throws
ok, it works for me here on Mac
maybe a discrepancy between linux and mac
although unlikely
so it might be a canary
vs dev
difference?
I’m using canary here
.11 currently
the link above installed Version 54.0.2810.2 dev (64-bit)
4.0.2811.0
54.0.2811.0
oh kk
might be that
but that won’t be the issue I guess
those versions are close enough
oh ok you are the expert in this 😉