dirac

Dirac v1.7.2 is out: https://github.com/binaryage/dirac/releases/tag/v1.7.2
denisj 2016-08-03T03:35:09.000464Z

@darwin, can 0.6.3 install/configure from :preloads like devtools?

superstructor 2016-08-03T04:35:20.000466Z

@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

πŸ‘ 1
denisj 2016-08-03T04:37:03.000468Z

@superstructor: thanks I have done the same.

denisj 2016-08-03T06:00:42.000472Z

@superstructor: Unfortunately I get an error in clojure.browser.repl bootstrap

superstructor 2016-08-03T06:01:31.000473Z

@denisj: what is the error ?

denisj 2016-08-03T06:03:12.000474Z

"Cannot read property 'appendChild' of null" in bootstrap, looks like js/document.body is null

denisj 2016-08-03T06:08:07.000477Z

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

denisj 2016-08-03T06:46:15.000479Z

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

denisj 2016-08-03T06:57:44.000480Z

ok I have hack to make it work:

...
(devtools/install! [:formatters :hints])
(js/setTimeout #(dirac/install! [:repl]) 100)) ; timout workaround for browser.repl exception
...

denisj 2016-08-03T06:58:33.000481Z

@darwin: or others, I'm happy to be shown the correct way

2016-08-03T07:06:55.000482Z

@denisj: I will add preloads support to dirac in the next dirac release, 0.6.3 was just a hot-fix release

πŸ‘ 1
denisj 2016-08-03T07:08:21.000484Z

Otherwise all the devtools formatting stuff is looking really nice

2016-08-03T07:09:41.000485Z

cool, I’m glad you like it, I spent good deal of time on making it as pixel-perfect as possible πŸ™‚

2016-08-03T07:10:53.000486Z

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)

2016-08-03T07:12:13.000489Z

I could fix it in Dirac, but that would be only partial solution for Dirac users, not for everyone

2016-08-03T07:13:31.000490Z

btw. all styles should be tweak-able via prefs, if anyone had time to play with it, I would accept suggestions for improvements

superstructor 2016-08-03T08:46:51.000492Z

@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 ?

denisj 2016-08-03T08:48:01.000493Z

np thanks, it's working for now

tianshu 2016-08-03T09:49:33.000498Z

with boot-cljs-devtools

tianshu 2016-08-03T10:15:50.000501Z

sorry, my fault, this is not the Dirac, this is the normal js console.. I haven't seen "CMD+SHIFT+I".

richiardiandrea 2016-08-03T19:33:53.000513Z

btw I will release 0.1.1 of powerlaces/boot-clj-devtools today

richiardiandrea 2016-08-03T19:34:08.000514Z

just need a little break from real work πŸ˜„

2016-08-03T19:34:17.000515Z

cool! go for it πŸ™‚

richiardiandrea 2016-08-03T19:34:21.000516Z

ok paid work ...ok you got that ah ah

2016-08-03T19:35:46.000517Z

you will earn 🦜🦜🦜 here, that definitely pays off πŸ˜‰

richiardiandrea 2016-08-03T19:36:10.000518Z

parrot money, my goal is to earn multiple instances of them lol

superstructor 2016-08-03T21:04:23.000522Z

@richiardiandrea: thanks for merging my pull request. 🦜

🦜 2
superstructor 2016-08-03T21:11:59.000523Z

@richiardiandrea: are you able to release soon please as I need that change for work today πŸ˜‰ ?

richiardiandrea 2016-08-03T21:12:11.000524Z

yeah I am πŸ˜‰

superstructor 2016-08-03T21:13:02.000525Z

@richiardiandrea: awesome thanks! Also might be worth testing as I only tested it once with my setup so far.

richiardiandrea 2016-08-03T21:13:38.000526Z

I am with lambone now

richiardiandrea 2016-08-03T21:13:39.000527Z

πŸ˜‰

richiardiandrea 2016-08-03T21:30:22.000528Z

@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

richiardiandrea 2016-08-03T21:31:23.000529Z

can we put all the preload stuff in one namespace for instance?

superstructor 2016-08-03T21:33:58.000530Z

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.

richiardiandrea 2016-08-03T21:38:04.000531Z

kk I am trying in the meantime

superstructor 2016-08-03T21:43:21.000532Z

What do you mean by one ns ? Like what @denisj had to do above in the chat history ?

superstructor 2016-08-03T21:44:23.000533Z

Maybe the version I tested had the requires ? Which I took out near the end ?

richiardiandrea 2016-08-03T21:44:59.000534Z

maybe...yes

richiardiandrea 2016-08-03T22:00:09.000537Z

I read that yes :preloads does not need :require

richiardiandrea 2016-08-03T22:03:39.000538Z

which cljs version are you using @superstructor ?

superstructor 2016-08-03T22:03:46.000539Z

@richiardiandrea: yep might not need :require but having the dirac ns required might have had some other effect on it working ?

richiardiandrea 2016-08-03T22:04:29.000541Z

mmm there might actually be a problem with my configuration in lambone, I don't see dirac on the classpath

superstructor 2016-08-03T22:08:04.000543Z

@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.

πŸ‘ 1
richiardiandrea 2016-08-03T22:17:50.000545Z

@superstructor: sorry to bother, when you do boot show -fwhat do you see?

superstructor 2016-08-03T22:18:38.000546Z

@richiardiandrea: no trouble at all, happy to help as much as I know how to, I see all my application sources ?

richiardiandrea 2016-08-03T22:18:55.000547Z

included dirac folder right?

superstructor 2016-08-03T22:19:06.000548Z

@richiardiandrea: nope don’t think so

superstructor 2016-08-03T22:19:12.000549Z

@richiardiandrea: getting off train brb 10 mins

richiardiandrea 2016-08-03T22:19:22.000550Z

kk no probz

richiardiandrea 2016-08-03T22:19:41.000551Z

thanks btw a lot, don't rush and be safe ah ah

superstructor 2016-08-03T22:36:16.000553Z

@richiardiandrea: there is only my app sources/resources (cljs, svg, html etc) and app.cljs.edn in boot show -f

superstructor 2016-08-03T22:36:54.000554Z

@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.

richiardiandrea 2016-08-03T22:37:27.000555Z

weird error really....but if it works for you i'll release

richiardiandrea 2016-08-03T22:37:37.000556Z

@superstructor: let me release a snapshot

richiardiandrea 2016-08-03T22:38:20.000557Z

then you can try with that, be sure to clean .m2/repository/powerlaces.... because snapshots are hard to handle...you need some brute force

richiardiandrea 2016-08-03T22:42:40.000558Z

deployed 0.1.1-SNAPSHOT

richiardiandrea 2016-08-03T23:16:43.000560Z

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

richiardiandrea 2016-08-03T23:17:26.000561Z

whoever wants to have a spin at it and confirm, version 0.1.1-SNAPSHOT is the one to try

superstructor 2016-08-03T23:30:12.000562Z

@richiardiandrea: your right, I get the same issue with Dirac. I will try :require for Dirac and :preloads for devtools ?

richiardiandrea 2016-08-03T23:31:03.000563Z

probably yes, we need to revert that, I don't seem to make it work

superstructor 2016-08-03T23:31:25.000564Z

ok I’ll do another pull request now to fix with :preloads for devtools only and :require for Dirac as before.

richiardiandrea 2016-08-03T23:31:33.000565Z

kk

superstructor 2016-08-03T23:42:02.000566Z

hmm I think this was only working at all before because I tested a jar that still had the requires included

richiardiandrea 2016-08-03T23:42:22.000567Z

ah, the peril of the SNAPSHOT πŸ˜„

richiardiandrea 2016-08-03T23:42:42.000568Z

it is definitely weird though, it should be working

richiardiandrea 2016-08-03T23:43:41.000569Z

also, maybe we can stick with powerlaces.boot-cljs-devtools.preload after all...otherwise it is a very long namespace name πŸ˜‰

superstructor 2016-08-03T23:43:54.000570Z

I think the option wasn’t in the right place, should be update-in [:compiler-options :preloads] so testing again with dirac

richiardiandrea 2016-08-03T23:44:05.000571Z

ah

richiardiandrea 2016-08-03T23:44:11.000572Z

yes I didn't check that

richiardiandrea 2016-08-03T23:44:22.000573Z

all the compiler options are there πŸ˜‰

richiardiandrea 2016-08-03T23:49:07.000574Z

@superstructor: I added some fix so please make sure you rebase if it is working

superstructor 2016-08-03T23:50:34.000575Z

@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.

richiardiandrea 2016-08-03T23:50:54.000576Z

awe-so-me!

richiardiandrea 2016-08-03T23:57:26.000579Z

merged and I am testing it

superstructor 2016-08-03T23:59:19.000581Z

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.