dirac

Dirac v1.7.2 is out: https://github.com/binaryage/dirac/releases/tag/v1.7.2
richiardiandrea 2016-07-29T15:57:44.000213Z

@superstructor: I deployed https://clojars.org/powerlaces/boot-cljs-devtools, can you give it a good as well please? version 0.1.1-SNAPSHOT

richiardiandrea 2016-07-29T16:34:30.000215Z

how was the shortcut to activate Dirac again? CTRL-PGUP ?

richiardiandrea 2016-07-29T16:43:06.000216Z

oh sorry I was using the standard panel all good

richiardiandrea 2016-07-29T17:02:22.000217Z

how can you evaluate forms? I pressing enter and it just adds a new line

richiardiandrea 2016-07-29T17:43:49.000219Z

no, it looks like evaluation does not work

2016-07-29T19:08:39.000220Z

@richiardiandrea: next version of dirac will support :preloads in the same way as cljs-devtools does

2016-07-29T19:09:07.000221Z

just need to push cljs-devtools v0.8 out and then focus on dirac polishing

richiardiandrea 2016-07-29T19:11:58.000222Z

@darwin I was trying to evaluate a form in Dirac but it was always adding a new line

richiardiandrea 2016-07-29T19:12:10.000223Z

both with and without Parinfer enabled

2016-07-29T19:12:58.000224Z

are you sure you were in dirac prompt? (green-ish background)

richiardiandrea 2016-07-29T19:13:18.000225Z

yeah there was a cljs.user green string showing up

2016-07-29T19:14:13.000226Z

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

2016-07-29T19:14:21.000228Z

there should be some

2016-07-29T19:15:47.000229Z

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

richiardiandrea 2016-07-29T19:16:27.000230Z

when it does like this in clojurescript it means that it cannot parse the input form..

richiardiandrea 2016-07-29T19:16:57.000231Z

I can try to enable verbose mode, I am using boot-cljs-devtools btw

2016-07-29T19:18:35.000232Z

set env variable DIRAC_NREPL_LOG_LEVEL to “DEBUG” before launching your nrepl server

richiardiandrea 2016-07-29T19:19:13.000235Z

k

2016-07-29T19:19:14.000236Z

or pass that config explicitely via boot (more advanced)

richiardiandrea 2016-07-29T19:19:54.000237Z

export DIRAC_NREPL_LOG_LEVEL=DEBUG; boot cider dev is easy enough 😉

2016-07-29T19:20:02.000238Z

sure

2016-07-29T19:21:33.000241Z

and :weasel-verbose in runtime config: https://github.com/binaryage/dirac/blob/master/src/runtime/dirac/runtime/prefs.cljs#L13

richiardiandrea 2016-07-29T19:21:57.000243Z

booting

2016-07-29T19:21:58.000244Z

weasel is the component responsible for evaluating compiled clojurescript sent from nrepl server back to client

2016-07-29T19:22:57.000245Z

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

richiardiandrea 2016-07-29T19:23:14.000247Z

uhm not really more verbose...

2016-07-29T19:24:05.000248Z

is boot cider dev really starting nrepl server?

richiardiandrea 2016-07-29T19:24:15.000249Z

yeah

richiardiandrea 2016-07-29T19:24:28.000250Z

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

1
2016-07-29T19:26:51.000251Z

hmm, looking into that

richiardiandrea 2016-07-29T19:28:02.000252Z

btw I moved the repo to https://github.com/boot-clj/boot-cljs-devtools

2016-07-29T19:29:02.000254Z

set both DIRAC_AGENT_LOG_LEVEL=debug DIRAC_NREPL_LOG_LEVEL=debug

2016-07-29T19:29:47.000255Z

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)

2016-07-29T19:29:56.000256Z

I don’t remember the details

richiardiandrea 2016-07-29T19:30:06.000257Z

k

2016-07-29T19:36:37.000259Z

changed both env vars to “all” and this is my output for evaluation form (+ 1 2): https://gist.github.com/darwin/d75e8cba060b5765aaff14dc2df1613f

richiardiandrea 2016-07-29T19:37:39.000261Z

wow, I don't see any of that

2016-07-29T19:38:29.000262Z

so maybe your boot task does not propagate env variables to spawned subprocesses?

2016-07-29T19:39:00.000263Z

I’m using the environ library

richiardiandrea 2016-07-29T19:40:27.000265Z

it can be that, I think the task was originally built using the repl built-in task which I think executes in a pod

richiardiandrea 2016-07-29T19:41:56.000266Z

so I cannot debug...but without env vars I cannot evaluate as well?

2016-07-29T19:42:24.000267Z

no, you should be able to eval just fine

2016-07-29T19:42:37.000268Z

env vars are just alternative way how to configure dirac

2016-07-29T19:42:56.000269Z

in our specific case, we wanted enable verbose logging to see what is going on

2016-07-29T19:44:03.000270Z

this should be fixed in your boot task anyways, users should be able to configure dirac via env vars

2016-07-29T19:44:39.000271Z

all dirac env vars have DIRAC_ prefix if it helps

2016-07-29T19:46:15.000273Z

can you share the project? I could try to reproduce it here

2016-07-29T19:46:31.000274Z

wait, Chrome 50.x?

2016-07-29T19:47:03.000277Z

you must be using Canary, they did a lot of changes in devtools recently, v50 is too old

richiardiandrea 2016-07-29T19:47:09.000278Z

oh

richiardiandrea 2016-07-29T19:47:52.000279Z

lemme update

richiardiandrea 2016-07-29T19:48:56.000280Z

Chrome Canary is currently not available on the linux platform.
You can try Chrome Canary for Windows 32-bit, Windows 64-bit or OSX. 

2016-07-29T19:49:05.000281Z

bad luck

richiardiandrea 2016-07-29T19:49:12.000282Z

it was 😉

2016-07-29T19:49:52.000283Z

google-chrome-unstable should work

richiardiandrea 2016-07-29T19:51:10.000286Z

trying

2016-07-29T19:53:21.000287Z

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

richiardiandrea 2016-07-29T19:53:22.000288Z

Version 54.0.2810.2 dev (64-bit)

richiardiandrea 2016-07-29T19:53:38.000289Z

oh wow cool stuff

richiardiandrea 2016-07-29T19:53:52.000290Z

i mean the node.js debugging

2016-07-29T19:54:14.000291Z

yeah

richiardiandrea 2016-07-29T19:54:34.000292Z

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>)

richiardiandrea 2016-07-29T19:54:42.000293Z

at least now we have an error

2016-07-29T19:55:48.000294Z

ok, this one was already reported by superstructor here in the channel, didn’t have time to look into that yet

richiardiandrea 2016-07-29T19:56:17.000296Z

ok no problem, at least now it evaluates it

richiardiandrea 2016-07-29T19:56:48.000297Z

Darwin thanks for your support and we discovered the env-var bug in boot-cljs-devtools 😉

richiardiandrea 2016-07-29T19:57:29.000299Z

I will open an issue with the above, I don't see it

2016-07-29T19:57:51.000300Z

yep, that should get fixed when you get time to dig into that, thanks

richiardiandrea 2016-07-29T19:58:25.000301Z

no hurry, time is limited, we try our best 😄

2016-07-29T19:59:09.000302Z

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

2016-07-29T19:59:19.000304Z

what was the form you tried to eval?

richiardiandrea 2016-07-29T20:00:33.000305Z

(println "test")

richiardiandrea 2016-07-29T20:01:10.000306Z

but any form throws

2016-07-29T20:01:56.000307Z

ok, it works for me here on Mac

2016-07-29T20:02:13.000308Z

maybe a discrepancy between linux and mac

2016-07-29T20:02:19.000309Z

although unlikely

richiardiandrea 2016-07-29T20:02:36.000310Z

so it might be a canary vs dev difference?

2016-07-29T20:02:47.000311Z

I’m using canary here

2016-07-29T20:02:56.000312Z

.11 currently

richiardiandrea 2016-07-29T20:03:06.000313Z

the link above installed Version 54.0.2810.2 dev (64-bit)

2016-07-29T20:03:18.000314Z

4.0.2811.0

2016-07-29T20:03:22.000315Z

54.0.2811.0

richiardiandrea 2016-07-29T20:03:28.000316Z

oh kk

richiardiandrea 2016-07-29T20:03:33.000317Z

might be that

2016-07-29T20:03:36.000318Z

but that won’t be the issue I guess

2016-07-29T20:03:45.000319Z

those versions are close enough

richiardiandrea 2016-07-29T20:03:47.000320Z

oh ok you are the expert in this 😉

😇 1