dirac

Dirac v1.7.2 is out: https://github.com/binaryage/dirac/releases/tag/v1.7.2
ricardo.ekm 2016-10-20T10:11:04.001832Z

Hi all! I'm trying to install Dirac to debug my clojurescript project, however I'm getting the following error:Internal Dirac Error TypeError: Cannot read property 'description' of undefined Dirac v0.7.2, Chrome/53.0.2785.143, Mac/10.10.5, Backend API/internal-56.0.2890.2@a83f4c8/460, Backend CSS/internal-56.0.2890.2@a83f4c8/406 DevTools code has thrown an unhandled exception: TypeError: Cannot read property 'description' of undefined at Object.compileCallback (<chrome-extension://kbkdngfljkchidcjpnfcgcokkbhlkogi/devtools/front_end/console/console_module.js:357:56>) at innerCallback (<chrome-extension://kbkdngfljkchidcjpnfcgcokkbhlkogi/devtools/front_end/inspector.js:8209:1>) at callback (<chrome-extension://kbkdngfljkchidcjpnfcgcokkbhlkogi/devtools/front_end/inspector.js:5720:39>) at Object.dispatchResponse (<chrome-extension://kbkdngfljkchidcjpnfcgcokkbhlkogi/devtools/front_end/inspector.js:5727:10>) at Object.dispatch (<chrome-extension://kbkdngfljkchidcjpnfcgcokkbhlkogi/devtools/front_end/inspector.js:5677:60>) at Object.onMessage (<chrome-extension://kbkdngfljkchidcjpnfcgcokkbhlkogi/devtools/frontend/inspector.js:12904:31>)

ricardo.ekm 2016-10-20T10:11:24.001833Z

Dirac agent is running

ricardo.ekm 2016-10-20T10:11:25.001834Z

Dirac Agent v0.7.2 Connected to nREPL server at <nrepl://localhost:8230>. Agent is accepting connections at <ws://localhost:8231>.

2016-10-20T10:11:45.001835Z

hi @ricardo.ekm, the problem is that you are using old Chrome

ricardo.ekm 2016-10-20T10:11:59.001836Z

And Dirac Chrome extension successfully connected to remote debugger 9002 port

2016-10-20T10:12:01.001837Z

you must be using latest Canary

ricardo.ekm 2016-10-20T10:12:04.001838Z

ah ok!

ricardo.ekm 2016-10-20T10:12:06.001839Z

thanks

ricardo.ekm 2016-10-20T10:12:08.001840Z

will try it

ricardo.ekm 2016-10-20T10:14:15.001843Z

ok!

ricardo.ekm 2016-10-20T10:14:48.001844Z

can you point me out where to download the latest canary?

ricardo.ekm 2016-10-20T10:15:23.001847Z

great! thanks

2016-10-20T10:15:24.001848Z

it is auto-updating, so you have no other choice but use the latest

2016-10-20T10:16:11.001849Z

in case of troubles, with each dirac release you have links to matching chromium snapshots, that is solution of last resort: https://github.com/binaryage/dirac/releases

2016-10-20T10:16:55.001851Z

for cases when dirac does not get timely updates and canary runs too far from it

ricardo.ekm 2016-10-20T10:33:37.001858Z

ok, I see!

ricardo.ekm 2016-10-20T10:34:06.001859Z

maybe you can help me with one more issue, I've put the dirac dependency in my project

ricardo.ekm 2016-10-20T10:34:12.001860Z

:dependencies [[org.clojure/clojure "1.8.0"] [org.clojure/clojurescript "1.8.51"] [binaryage/dirac "0.7.2"] [binaryage/devtools "0.8.2"]]

ricardo.ekm 2016-10-20T10:34:17.001861Z

however I'm getting the following error

ricardo.ekm 2016-10-20T10:34:46.001862Z

Dirac requires runtime support from your app. Please install Dirac Runtime into your app and enable the :repl feature. ReferenceError: dirac is not defined at <anonymous>:1:2

ricardo.ekm 2016-10-20T10:35:25.001863Z

my full project file

ricardo.ekm 2016-10-20T10:35:28.001864Z

(defproject signal-clojurescript "2.0.0" :description "FIXME: write description" :url "http://example.com/FIXME" :license {:name "Eclipse Public License" :url "http://www.eclipse.org/legal/epl-v10.html"} :dependencies [[org.clojure/clojure "1.8.0"] [org.clojure/clojurescript "1.8.51"] [binaryage/dirac "0.7.2"] [binaryage/devtools "0.8.2"]] :plugins [[lein-figwheel "0.5.4-7"] [lein-cljsbuild "1.1.4"] [lein-expectations "0.0.7"]] :resource-paths ["resources/"] :target-path "target/%s" :clean-targets [:target-path "js/out"] :profiles {:uberjar {:aot :all}} :repl-options {:port 8230 :nrepl-middleware [dirac.nrepl/middleware] :init (do (require 'dirac.agent) (dirac.agent/boot!))} :figwheel { :http-server-root "public" :server-port 3002 :server-ip "0.0.0.0" :repl false } :cljsbuild { :builds {:dev { :source-paths ["src"] :figwheel true :compiler {:main "signal-cljs.main" :source-map true :optimizations :none :asset-path "http://localhost:3002/js/out" :output-to "resources/public/js/main.js" :output-dir "resources/public/js/out"}} :prod { :source-paths ["src"] :compiler {:asset-path "https://static.takeabridge.com/js/out" :optimizations :advanced :pretty-print false :output-to "resources/public/js/main.js"}}}})

2016-10-20T10:36:04.001865Z

you need dirac.runtime in :preloads, please follow installation instructions

ricardo.ekm 2016-10-20T10:36:56.001868Z

ok, got it

ricardo.ekm 2016-10-20T10:49:55.001869Z

sorry for asking again, I inserted the preload instruction but the error is the same

ricardo.ekm 2016-10-20T10:49:59.001870Z

:compiler {:preloads [devtools.preload dirac.runtime.preload] :main "signal-cljs.main" :source-map true :optimizations :none :asset-path "http://localhost:3002/js/out" :output-to "resources/public/js/main.js" :output-dir "resources/public/js/out"}}

ricardo.ekm 2016-10-20T10:50:16.001871Z

if I change dirac.runtime.preload to "blablabla" it keeps compiling

ricardo.ekm 2016-10-20T10:50:34.001872Z

so maybe it isnt loading it

ricardo.ekm 2016-10-20T10:51:38.001873Z

(I'm using figwheel, I don't if it matters)

2016-10-20T11:07:03.001874Z

@ricardo.ekm you have to completely restart lein/figwheel when doing changes into project.clj

ricardo.ekm 2016-10-20T11:13:38.001875Z

yes, I did it

ricardo.ekm 2016-10-20T11:13:44.001876Z

tried lean clean

ricardo.ekm 2016-10-20T11:13:53.001877Z

and deleted target folders

2016-10-20T11:16:01.001878Z

ok, show me again your project.clj, but better paste it as a snippet (+ button here) or via http://gist.github.com

2016-10-20T11:19:16.001880Z

looks good to me

2016-10-20T11:19:49.001881Z

just your :clean-targets does not contain resources/public/js/out

2016-10-20T11:20:16.001882Z

also you want to probably remove js/main.js to make really clean build

2016-10-20T11:20:42.001883Z

so I would recommend to put it into js/out/main.js instead

2016-10-20T11:21:00.001884Z

ah, now I see the issue

2016-10-20T11:21:19.001885Z

you are using old clojurescript version

2016-10-20T11:21:34.001886Z

1.8.51 had no awareness of :preloads

ricardo.ekm 2016-10-20T11:21:36.001887Z

hmmmm

2016-10-20T11:21:41.001888Z

it is pretty recent addition

ricardo.ekm 2016-10-20T11:22:04.001889Z

got it!

ricardo.ekm 2016-10-20T11:22:10.001890Z

great man, thanks! gonna upgrade

2016-10-20T11:22:29.001891Z

go for 1.9.293