Started trying it out, first with the sample project, but lein dirac
in the sample project complains about analyzer.clj
not being on the path. Should I be running something else first (like lein deps
)?
Couldn't get the demo project work
But my project works okay it seems.
Now off to play with it.
One thing I notice is I can't seem to dock the tools like I can do with those built-in into Chrome.
Out of curiosity, is completion something that is possible to implement?
I also get:
> (in-ns 'scrabble.frontend.synchronisation.core)
nil
> db
WARNING: Use of undeclared Var scrabble.frontend.synchronisation.core/db at line 1 <dirac repl>
*value of datascript db*
I'm not sure if I'm doing something wrong or does dirac not have enough compile-time information to tell it's valid.
@jaen: don’t know anything about analyzer.clj, maybe I’m missing some dependency there, but in my environ it gets included automatically for some reason
docking won’t work, that is a feature hard-coded into chrome to support integrated devtools
completion is definitely possible to implement, at least for javascript context it is already implemented, for cljs context it would need to talk to sone nREPL middleware which will provide the data
that code exists, but I haven’t looked into it yet
Gotcha. One more question - do you also observer the Clojure input in console taking more space than Javascript input?
you mean styling?
I observed broken styles when in “drawer” mode on Sources panel
it takes too much vertical space
also I observed “floating” of console content, like it would print with some styles and then after a moment some other styles were applied and text jumps slightly
it is a bit annoying
btw. are you on a Mac? I use SizeUp for window management and it is quite convenient to have devtools in a new window, then I can use my windowing keyboard shortcuts to arrange it
on screen
Mac? Nah, Arch Loonix.
> I observed broken styles when in “drawer” mode on Sources panel > it takes too much vertical space
Yeah, that would be how I would describe it.
And yes, it does also jump a bit when you evaluate something
And it wants to scroll
I will fix those css issues
just have to figure out what is going on there
btw: a protip: when you open Dirac extension options, you can switch opening mode to “window” and then you can have integrated devtools for inspection of dirac devtools app
handy if you wanted to inspect the html, code is compiled with advanced optimizations tough
But yeah, I use a tiling WM so I also just conveniently tiled it alongside the main window. It's just kind of my first reflex to dock it instead for some reason '
Also good to know re: being able to devtools the devtools.
it is “just” a webapp, which has web socket connection to chrome with open debugging protocol
it is also quite easy to use it from sources, you just point a static webserver to their sources directory and it works
Sources as in checkout the github repo, compile, serve and voila?
yep, in case of dirac, you just need to compile clojurescript sources as well, this is the script for static server I was using:
https://github.com/binaryage/dirac/blob/master/scripts/dev-server.sh and lein fig
to get sources compiled (in dev mode)
in another words, you don’t have to mess with the Chrome Extension wrapper if you want to quickly hack on it in source form
Ah, I see. That seems to be pretty handy.