dirac 2016-09-15

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

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

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

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

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

is there dirac subfolder?

and rebuild you β€œdev” build-id from scratch

people make easy mistake and don’t clean cljs resources

heh, no clue where i got that line from πŸ˜•

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

are you sure RELEASE picked up 0.6.6?

maybe specify it explicitly

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

specified 0.6.6, same behavior

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

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

same behaviour here, that is good news πŸ™‚

πŸ˜„ πŸ˜„

you are using ancient clojurescript

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

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

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

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

hee, sounds good

thanks again!

have to go, good luck!

ok now we're getting somewhere!

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

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

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

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

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

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

thanks! πŸ™‚

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.

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

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

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

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

❀️ ❀️

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

this seems to be an addon with dirac and devtools included

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

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'")

thanks again for your help!

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

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