Fork me on GitHub
#dirac
<
2016-08-03
>
denisj03:08:09

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

superstructor04:08:20

@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

denisj04:08:03

@superstructor: thanks I have done the same.

denisj06:08:42

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

superstructor06:08:31

@denisj: what is the error ?

denisj06:08:12

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

denisj06:08:07

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

denisj06:08:15

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

denisj06:08:44

ok I have hack to make it work:

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

denisj06:08:33

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

darwin07:08:55

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

denisj07:08:21

Otherwise all the devtools formatting stuff is looking really nice

darwin07:08:41

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

darwin07:08:53

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)

darwin07:08:13

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

darwin07:08:31

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

superstructor08:08:51

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

denisj08:08:01

np thanks, it's working for now

tianshu09:08:33

with boot-cljs-devtools

tianshu10:08:50

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

richiardiandrea19:08:53

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

richiardiandrea19:08:08

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

darwin19:08:17

cool! go for it ๐Ÿ™‚

richiardiandrea19:08:21

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

darwin19:08:46

you will earn parrotparrotparrot here, that definitely pays off ๐Ÿ˜‰

richiardiandrea19:08:10

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

superstructor21:08:23

@richiardiandrea: thanks for merging my pull request. parrot

superstructor21:08:59

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

richiardiandrea21:08:11

yeah I am ๐Ÿ˜‰

superstructor21:08:02

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

richiardiandrea21:08:38

I am with lambone now

richiardiandrea21:08:22

@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

richiardiandrea21:08:23

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

superstructor21:08:58

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.

richiardiandrea21:08:04

kk I am trying in the meantime

superstructor21:08:21

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

superstructor21:08:23

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

richiardiandrea22:08:09

I read that yes :preloads does not need :require

richiardiandrea22:08:39

which cljs version are you using @superstructor ?

superstructor22:08:46

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

richiardiandrea22:08:29

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

superstructor22:08:04

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

richiardiandrea22:08:50

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

superstructor22:08:38

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

richiardiandrea22:08:55

included dirac folder right?

superstructor22:08:06

@richiardiandrea: nope donโ€™t think so

superstructor22:08:12

@richiardiandrea: getting off train brb 10 mins

richiardiandrea22:08:41

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

superstructor22:08:16

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

superstructor22:08:54

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

richiardiandrea22:08:27

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

richiardiandrea22:08:37

@superstructor: let me release a snapshot

richiardiandrea22:08:20

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

richiardiandrea22:08:40

deployed 0.1.1-SNAPSHOT

richiardiandrea23:08:43

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

richiardiandrea23:08:26

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

superstructor23:08:12

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

richiardiandrea23:08:03

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

superstructor23:08:25

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

superstructor23:08:02

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

richiardiandrea23:08:22

ah, the peril of the SNAPSHOT ๐Ÿ˜„

richiardiandrea23:08:42

it is definitely weird though, it should be working

richiardiandrea23:08:41

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

superstructor23:08:54

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

richiardiandrea23:08:11

yes I didn't check that

richiardiandrea23:08:22

all the compiler options are there ๐Ÿ˜‰

richiardiandrea23:08:07

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

superstructor23:08:34

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

richiardiandrea23:08:26

merged and I am testing it

superstructor23:08:19

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.