Fork me on GitHub
#dirac
<
2016-09-15
>
darwin00:09:06

looks good to me

darwin00:09:22

go to javascript console in your page, and look if dirac object exists

jrheard00:09:38

VM244:1 Uncaught ReferenceError: dirac is not defined at <anonymous>:1:1

darwin00:09:42

on disk, look into resources/public/js/compiled/out

darwin00:09:50

is there dirac subfolder?

darwin00:09:01

lein clean

darwin00:09:17

and rebuild you “dev” build-id from scratch

darwin00:09:00

people make easy mistake and don’t clean cljs resources

jrheard00:09:22

heh, no clue where i got that line from 😕

jrheard00:09:41

i did lein clean and lein cljsbuild once dev, but i still see no dirac folder in resources/public/js/compiled/out! hrm

darwin00:09:10

are you sure RELEASE picked up 0.6.6?

darwin00:09:32

maybe specify it explicitly

darwin00:09:26

but no, it cannot be that bug, even with that bug present, dirac object would exist

jrheard00:09:51

specified 0.6.6, same behavior

darwin00:09:52

can you push you version?, I would try the project here on my machine

jrheard00:09:06

absolutely - the 'ai' branch should be up to date

darwin00:09:31

same behaviour here, that is good news 🙂

darwin00:09:24

you are using ancient clojurescript

darwin00:09:46

this bug was there when dnolen introduced :preloads, 2+ months ago

jrheard00:09:00

aha! i'm picking up this project after not having touched it in 6-7 months, so that figures

jrheard00:09:57

i'll go through and update those, i'm sure that's the problem

darwin00:09:05

you cannot assume using cutting-edge technologies like dirac with old clojurescript, you have to run bleeding edge versions

jrheard00:09:11

hee, sounds good

jrheard00:09:24

thanks again!

darwin00:09:31

have to go, good luck!

jrheard01:09:52

ok now we're getting somewhere!

jrheard01:09:08

my project's configuration / general situation is all messed up in general, but i'll sort it all out eventually

jrheard01:09:50

to get figwheel code reloading and dirac to happen at the same time:

jrheard01:09:55

i added [figwheel-sidecar "0.5.7"] to my deps

jrheard01:09:23

and, per https://github.com/bhauman/lein-figwheel/wiki/Using-the-Figwheel-REPL-within-NRepl , ran lein repl (at which point the dirac agent starts up), then (use 'figwheel-sidecar.repl-api) followed by (start-figwheel!)

jrheard01:09:46

at which point figwheel's auto code reloading / etc gets set up

jrheard01:09:21

and dirac devtools is able to connect, and i've got a working cljs repl in it, and i can inspect my app's state, etc etc

jrheard01:09:34

thanks! 🙂

smw01:09:50

I’ll say, after many many times of messing with figwheel and friends w/lein, the boot tooling around magic cljs reload is way simpler.

jrheard01:09:57

i'll have to give boot a shot one of these days

jrheard01:09:22

you're saying it comes with figwheel-style auto-reloading of code built in, or easily achievable?

jrheard01:09:03

i mainly just want to have my editor open on one monitor, and my browser open on another, and when i change my code in one window, the other window magically updates to use my new code

smw01:09:21

(deftask dev-cljs-repl
  "Run a restartable system in the Repl"
  []
  (comp
   (environ :env {:http-port "3300" :dev true})
   (watch :verbose true)
   (system :sys #'dev-system :auto true :files ["handler.clj"])
   (reload :port 55554)
   (cljs-repl)
   (cljs)
   (speak)))

jrheard01:09:41

❤️ ❤️

jrheard01:09:53

writing all this down, thanks for the code+links!

smw01:09:50

this seems to be an addon with dirac and devtools included

jrheard02:09:54

@darwin - low-priority, about to head out for the night and also this is just a little toy project and not urgent at all, but fwiw: on the ai branch, dirac seems to work successfully, but i see this when i try to type into its repl:

jrheard02:09:56

Internal Dirac Error: an error was logged into the internal DevTools console Dirac v0.6.6, Chrome/55.0.2860.0, Mac/10.11.5, Backend API/external (449 registrations), Backend CSS/external (403 definitions) ("unable to locate sourceMap when extracting symbols for ClojureScript namespace 'cljs.core'")

jrheard02:09:45

thanks again for your help!

jrheard02:09:04

(couldn't find any variation of "unable to locate sourceMap" in google / github)

jrheard02:09:46

https://github.com/binaryage/dirac/blob/master/docs/configuration.md mentions that :source-map-timestamp true is necessary, and i've got that set in my project.clj

darwin10:09:54

you are not using https://github.com/binaryage/cljs-devtools, I would recommend installing it

darwin10:09:36

I have just tested your project here on my machine with canary 55.0.2861.0 and it works, no sourcemap error