Fork me on GitHub
#dirac
<
2016-07-29
>
richiardiandrea15:07:44

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

richiardiandrea16:07:30

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

richiardiandrea16:07:06

oh sorry I was using the standard panel all good

richiardiandrea17:07:22

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

richiardiandrea17:07:49

no, it looks like evaluation does not work

darwin19:07:39

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

darwin19:07:07

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

richiardiandrea19:07:58

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

richiardiandrea19:07:10

both with and without Parinfer enabled

darwin19:07:58

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

richiardiandrea19:07:18

yeah there was a cljs.user green string showing up

darwin19:07:21

there should be some

darwin19:07:47

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

richiardiandrea19:07:27

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

richiardiandrea19:07:57

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

darwin19:07:35

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

darwin19:07:14

or pass that config explicitely via boot (more advanced)

richiardiandrea19:07:54

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

darwin19:07:58

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

richiardiandrea19:07:14

uhm not really more verbose...

darwin19:07:05

is boot cider dev really starting nrepl server?

richiardiandrea19:07:28

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 - 
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 .
Agent is accepting connections at .
Elapsed time: 28.075 sec

darwin19:07:51

hmm, looking into that

darwin19:07:02

set both DIRAC_AGENT_LOG_LEVEL=debug DIRAC_NREPL_LOG_LEVEL=debug

darwin19:07:47

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)

darwin19:07:56

I don’t remember the details

darwin19:07:37

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

richiardiandrea19:07:39

wow, I don't see any of that

darwin19:07:29

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

darwin19:07:00

I’m using the environ library

richiardiandrea19:07:27

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

richiardiandrea19:07:56

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

darwin19:07:24

no, you should be able to eval just fine

darwin19:07:37

env vars are just alternative way how to configure dirac

darwin19:07:56

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

darwin19:07:03

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

darwin19:07:39

all dirac env vars have DIRAC_ prefix if it helps

darwin19:07:15

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

darwin19:07:31

wait, Chrome 50.x?

darwin19:07:03

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

richiardiandrea19:07:56

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

darwin19:07:52

google-chrome-unstable should work

darwin19:07:21

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

richiardiandrea19:07:22

Version 54.0.2810.2 dev (64-bit)

richiardiandrea19:07:38

oh wow cool stuff

richiardiandrea19:07:52

i mean the node.js debugging

richiardiandrea19:07:34

Internal Dirac Error: DevTools code has thrown an unhandled exception
TypeError: Cannot read property 'shift' of undefined
    at WebInspector.ConsoleView._alterDiracViewMessage ()
    at WebInspector.ConsoleView._createViewMessage ()
    at WebInspector.ConsoleView._addConsoleMessage ()
    at WebInspector.ConsoleView._onConsoleMessageAdded ()
    at WebInspector.MultitargetConsoleModel.dispatchEventToListeners ()
    at WebInspector.MultitargetConsoleModel._consoleMessageAdded ()
    at WebInspector.ConsoleModel.dispatchEventToListeners ()
    at WebInspector.ConsoleModel.addMessage ()
    at WebInspector.DiracAwareConsoleDispatcher.messageAdded ()
    at WebInspector.DiracAwareConsoleDispatcher.messageAdded ()

richiardiandrea19:07:42

at least now we have an error

darwin19:07:48

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

richiardiandrea19:07:17

ok no problem, at least now it evaluates it

richiardiandrea19:07:48

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

richiardiandrea19:07:29

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

darwin19:07:51

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

richiardiandrea19:07:25

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

darwin19:07:19

what was the form you tried to eval?

richiardiandrea20:07:33

(println "test")

richiardiandrea20:07:10

but any form throws

darwin20:07:56

ok, it works for me here on Mac

darwin20:07:13

maybe a discrepancy between linux and mac

darwin20:07:19

although unlikely

richiardiandrea20:07:36

so it might be a canary vs dev difference?

darwin20:07:47

I’m using canary here

darwin20:07:56

.11 currently

richiardiandrea20:07:06

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

darwin20:07:18

4.0.2811.0

darwin20:07:22

54.0.2811.0

darwin20:07:36

but that won’t be the issue I guess

darwin20:07:45

those versions are close enough

richiardiandrea20:07:47

oh ok you are the expert in this 😉