dirac

Dirac v1.7.2 is out: https://github.com/binaryage/dirac/releases/tag/v1.7.2
Casey 2018-05-04T18:08:12.000722Z

@darwin Is there a way to connect dirac to a node inspector web socket directly? I have a url that looks like this 127.0.0.1:7777/inspect/8380ad1ea17af8b

Casey 2018-05-04T18:09:42.000333Z

i plopped that in the options url field.. but its not opening. Hm, wonder how i can get chrome extension error logs

Casey 2018-05-04T18:10:52.000410Z

oh interesting.. the docs have a screenshot of the options UI and it has more options than mine does..

Casey 2018-05-04T18:11:25.000202Z

Looks like its clipped? I can't resize or scroll in that dialog

2018-05-04T19:15:29.000131Z

@ramblurr it is definitely clipped, btw. you’ve probably missed this document: https://github.com/binaryage/dirac/blob/master/docs/node.md

2018-05-04T19:16:04.000356Z

not sure if it is still relevant, but at one point it worked with node (I don’t develop with node, so I didn’t test it recently)

Casey 2018-05-04T19:25:44.000582Z

Thanks, yea, those node docs are where I found out about the "missing" (clipped) options. I just needed to pass extra url params.

Casey 2018-05-04T19:26:09.000423Z

inspecting the extension options ui reveals a overflow: hidden class on the body that hides the scroll bar

Casey 2018-05-04T19:27:41.000210Z

Those node docs don't mention anything about the Dirac Agent... is it not needed for node inspecting?

2018-05-04T19:28:33.000039Z

it is needed as well as nREPL server

2018-05-04T19:29:17.000362Z

it should be the same as with classic web dev

Casey 2018-05-04T19:34:09.000166Z

awesome, used the sample "repl" profile and it works great

Casey 2018-05-04T19:34:18.000445Z

confirmed it still works with node 🙂

2018-05-04T19:34:43.000077Z

great!

Casey 2018-05-04T19:35:23.000099Z

hm, so what's going on with the repl instance exactly? that's a full clojure jvm repl right?

2018-05-04T19:35:31.000222Z

that clipped preferences window problem is probably related to size of your chrome window

Casey 2018-05-04T19:35:51.000142Z

so when i type (+ 1 1) into the dirac repl in devtools .. is it being executed in jvm or in my cljs node context?

2018-05-04T19:36:04.000522Z

I think those css styles come from chrome

2018-05-04T19:36:44.000231Z

in your node, jvm just runs clojurescript which compiles cljs -> js, which is then executed

Casey 2018-05-04T19:37:20.000246Z

cool, that makes sense

2018-05-04T19:38:47.000020Z

try something like (js/console.log (js/process.platform))

2018-05-04T19:39:15.000248Z

or process.release

Casey 2018-05-04T19:58:03.000324Z

@darwin using the node demo project, i can't seem to get the source maps to work properly

Casey 2018-05-04T19:59:18.000289Z

the http server serving the source maps is working (e.g., http://localhost:9988/.compiled/dirac_sample/demo.js.map)

Casey 2018-05-04T19:59:37.000173Z

and chrome pops up a notification bar that says "Source maps detected"

Casey 2018-05-04T19:59:44.000257Z

but I don't see the clojure code.. just the js

2018-05-04T20:00:08.000605Z

I’m sorry I cannot assist with this right now, the problem could be very subtle

2018-05-04T20:00:48.000099Z

it worked for me a year ago, but things could break or your setup has some issue

Casey 2018-05-04T20:01:53.000643Z

no worries, thanks for the help and effort thus far

2018-05-04T20:02:02.000355Z

this could give you some insights: https://dev.clojure.org/jira/browse/CLJS-1902

2018-05-04T20:02:21.000281Z

it was meant to give people an easy workaround for node+dirac+devtools source map issues

2018-05-04T20:02:59.000444Z

you might ask @richiardiandrea if he remembers the details, see his comment

richiardiandrea 2018-05-04T20:04:33.000037Z

oh man, that was long ago, don't really remember the details...

Casey 2018-05-04T20:05:56.000268Z

hm yea, the local webserver serving source maps is the workaround for that right?

Casey 2018-05-04T20:08:28.000071Z

Ah that patch is also for inlined source maps, that would be handy

richiardiandrea 2018-05-04T20:09:03.000478Z

yeah the inline side of source maps in cljs is only for self-host at the moment, there is no way to read them in iirc

Casey 2018-05-04T20:11:24.000518Z

still though, i wonder why the source mapping url workaround isn't working in this case.

Casey 2018-05-04T20:14:21.000318Z

ooh, using vanilla chrome devtools, the .cljs source is visible

Casey 2018-05-04T20:14:22.000492Z

strange

Casey 2018-05-04T21:02:19.000126Z

@richiardiandrea do you have any plans to re-submit that patch?

richiardiandrea 2018-05-04T21:03:28.000323Z

I think it should be rebased, but core team did not seem to keen at the time

richiardiandrea 2018-05-04T21:03:45.000519Z

maybe darwin can actually push that again

Casey 2018-05-04T21:04:43.000339Z

from reading the node.js ticket on source maps, it seems the "right way" is via source map inlining

2018-05-04T21:04:59.000131Z

it was a hairy code I completely lost context, that is why I’m not going to look at it again, I don’t really need it myself

Casey 2018-05-04T21:05:02.000210Z

because there is some specific wonkiness with absolute urls

2018-05-04T21:06:06.000505Z

feel free to jump on it 🙂

2018-05-04T21:06:33.000028Z

it probably needs a simple rebase, but understanding and testing it is the difficult part

Casey 2018-05-04T21:07:53.000542Z

maybe i can give it a go, haven't setup a cljs dev environment before

2018-05-04T21:08:05.000146Z

you might try to rebase it and test it with custom cljs compiler build on your machine

2018-05-04T21:08:11.000253Z

it will likely work