@darwin, can 0.6.3 install/configure from :preloads like devtools?
@denisj: I just did this for boot which works (i.e. made my own stub ns for Dirac preloads): https://github.com/boot-clj/boot-cljs-devtools/pull/1/files
@superstructor: thanks I have done the same.
@superstructor: Unfortunately I get an error in clojure.browser.repl bootstrap
@denisj: what is the error ?
"Cannot read property 'appendChild' of null" in bootstrap, looks like js/document.body is null
It's a little odd because :preloads on same ns (my stub which install devtools + dirac) from my test build, works fine. Some I'm trying to tease out what's different between my "dev" + "test" build
my ns is like this and works as long as the dirac/install! is commented
(ns day8.dev-preload
(:require
[dirac.runtime :as dirac]
[devtools.core :as devtools]))
(devtools/install! [:formatters :hints])
#_(dirac/install! [:repl])
ok I have hack to make it work:
...
(devtools/install! [:formatters :hints])
(js/setTimeout #(dirac/install! [:repl]) 100)) ; timout workaround for browser.repl exception
...
@darwin: or others, I'm happy to be shown the correct way
@denisj: I will add preloads support to dirac in the next dirac release, 0.6.3 was just a hot-fix release
Otherwise all the devtools formatting stuff is looking really nice
cool, Iβm glad you like it, I spent good deal of time on making it as pixel-perfect as possible π
btw. we will need some css changes upstream in devtools to make some things less hacky (the generated markup uses some nasty CSS tricks to play well with existing CSS in devtools console)
I could fix it in Dirac, but that would be only partial solution for Dirac users, not for everyone
btw. all styles should be tweak-able via prefs, if anyone had time to play with it, I would accept suggestions for improvements
@denisj: sorry was away from my computer. Iβm not sure why you need to use setTimeout
as in boot-cljs-devtools it works for me with devtools and dirac in their own preload ns but no setTimeout
?
np thanks, it's working for now
with boot-cljs-devtools
sorry, my fault, this is not the Dirac, this is the normal js console.. I haven't seen "CMD+SHIFT+I".
btw I will release 0.1.1
of powerlaces/boot-clj-devtools
today
just need a little break from real work π
cool! go for it π
ok paid work ...ok you got that ah ah
you will earn π¦π¦π¦ here, that definitely pays off π
parrot money, my goal is to earn multiple instances of them lol
@richiardiandrea: thanks for merging my pull request. π¦
@richiardiandrea: are you able to release soon please as I need that change for work today π ?
yeah I am π
@richiardiandrea: awesome thanks! Also might be worth testing as I only tested it once with my setup so far.
I am with lambone now
π
@superstructor: it throws an:
Dirac requires runtime support from your app.
Please install Dirac Runtime into your app and enable the :repl feature.
Uncaught ReferenceError: dirac is not defined
can we put all the preload stuff in one namespace for instance?
Hmm strange was working for me with a local snapshot jar. Will be able to test again and respond properly when I get into the office in 30-45mins.
kk I am trying in the meantime
What do you mean by one ns ? Like what @denisj had to do above in the chat history ?
Maybe the version I tested had the requires ? Which I took out near the end ?
maybe...yes
I read that yes :preloads
does not need :require
which cljs version are you using @superstructor ?
@richiardiandrea: yep might not need :require
but having the dirac ns required might have had some other effect on it working ?
mmm there might actually be a problem with my configuration in lambone, I don't see dirac
on the classpath
@richiardiandrea: note in above snippet boot-cljs-devtools 0.2.0 is a version that does not exist, its just a local jar deployment I was using for testing.
@superstructor: sorry to bother, when you do boot show -f
what do you see?
@richiardiandrea: no trouble at all, happy to help as much as I know how to, I see all my application sources ?
included dirac
folder right?
@richiardiandrea: nope donβt think so
@richiardiandrea: getting off train brb 10 mins
kk no probz
thanks btw a lot, don't rush and be safe ah ah
@richiardiandrea: there is only my app sources/resources (cljs, svg, html etc) and app.cljs.edn
in boot show -f
@richiardiandrea: Iβll build another snapshot off master with a different version number again of boot-clj/boot-cljs-devtools
and see if it works.
weird error really....but if it works for you i'll release
@superstructor: let me release a snapshot
then you can try with that, be sure to clean .m2/repository/powerlaces....
because snapshots are hard to handle...you need some brute force
deployed 0.1.1-SNAPSHOT
no definitely does not work in lambone, we'll need to postpone my debugging, let me know if it works for you and I will release
whoever wants to have a spin at it and confirm, version 0.1.1-SNAPSHOT
is the one to try
@richiardiandrea: your right, I get the same issue with Dirac. I will try :require
for Dirac and :preloads
for devtools ?
probably yes, we need to revert that, I don't seem to make it work
ok Iβll do another pull request now to fix with :preloads
for devtools only and :require
for Dirac as before.
kk
hmm I think this was only working at all before because I tested a jar that still had the requires included
ah, the peril of the SNAPSHOT π
it is definitely weird though, it should be working
also, maybe we can stick with powerlaces.boot-cljs-devtools.preload
after all...otherwise it is a very long namespace name π
I think the option wasnβt in the right place, should be update-in [:compiler-options :preloads]
so testing again with dirac
ah
yes I didn't check that
all the compiler options are there π
@superstructor: I added some fix so please make sure you rebase if it is working
@richiardiandrea: aha it was my bad, i had tested a stale jar with both :require
and :preloads
, where :preloads
was a no-op because its actually supposed to be in :compiler-options
. I now have devtools and dirac both working with :compiler-options :preloads
only (no :require
). Pull request coming in a few minutes.
awe-so-me!
@richiardiandrea: https://github.com/boot-clj/boot-cljs-devtools/pull/2
merged and I am testing it
I still get the warning util.cljs:86 CLJS DevTools: some custom formatters were not rendered.
, but I think its harmless as everything appears to work OK.