This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-05-06
Channels
- # admin-announcements (6)
- # beginners (147)
- # boot (9)
- # braveandtrue (5)
- # cider (11)
- # cljsjs (1)
- # cljsrn (4)
- # clojure (82)
- # clojure-greece (9)
- # clojure-poland (9)
- # clojure-russia (288)
- # clojure-taiwan (2)
- # clojure-uk (73)
- # clojurescript (123)
- # consulting (3)
- # cursive (26)
- # datascript (4)
- # datomic (32)
- # dirac (56)
- # emacs (11)
- # flambo (2)
- # hoplon (425)
- # jobs-rus (1)
- # lein-figwheel (3)
- # leiningen (16)
- # luminus (42)
- # mount (7)
- # om (1)
- # om-next (2)
- # onyx (8)
- # other-languages (146)
- # quil (3)
- # re-frame (17)
- # reagent (6)
- # spacemacs (2)
- # uncomplicate (8)
- # untangled (71)
- # vim (2)
- # yada (49)
clojure.lang.Compiler$CompilerException: java.lang.RuntimeException: No such var: string/index-of, compiling:(dirac/nrepl/sessions.clj:149:14)
I think this requires Clojure 1.8 ? Will upgrade now.@superstructor: ah, didn’t know that index-of is 1.8+, it is definitely something which could be written a different way
Sweet. Looks like it’s all working fine. I can connect to the repl via boot repl
and emacs. 😄
currently only two middleware commands are implemented on Dirac’s side “eval” and “load-file”, I’m not sure if IDEs use anything beyond that
if you ever see “Received unrecognized forwarded nREPL message”, I have to look into that scenario: https://github.com/binaryage/dirac/blob/master/src/implant/dirac/implant/intercom.cljs#L279
Upgraded to Clojure 1.8 and Boot 2.5.5, put the following in my deps:
[binaryage/devtools "0.6.1" :scope "test"]
[binaryage/dirac "0.3.0" :scope "test"]
[jupl/boot-cljs-devtools "0.1.0" :scope "test”]
I see that everything gets started in the output of my task; e.g.
nREPL server started on port 8230 on host 127.0.0.1 -
Adding :require [devtools.core dirac.runtime] and :init-fns [devtools.core/install! dirac.runtime/install!] to test.cljs.edn...
Adding :require [devtools.core dirac.runtime] and :init-fns [devtools.core/install! dirac.runtime/install!] to main.cljs.edn…
Dirac Agent v0.3.0
Connected to nREPL server at .
Tunnel is accepting connections at .
Then I load the browser page and get in the Dirac v0.3.0 extension:
Installing Dirac Runtime v0.3.0 and enabling features :repl
core.cljs:49 Installing CLJS DevTools v0.6.1 and enabling features :custom-formatters :sanity-hints
client.cljs:49 Reload websocket connected.
But then if I type any ClojureScript the syntax is not recognised, its attempting to parse it as JavaScript. Any idea what is missing ?@superstructor: Once you connect to the repl @port 8230.
@superstructor: you have to switch to Dirac REPL prompt by PageUp or PageDown in JS console
this should be documented better, it is now just mentioned once in dirac-sample walkthrough
ah nice! sorry didn’t know that. So Chrome REPL is working now. Cursive won’t connect yet, hangs after
Connecting to remote nREPL server...
Clojure 1.8.0
checking to see if I missed anything@superstructor: If you want to test if you can connect to the nREPL, you can run this command in the command line: boot repl -c -p 8230
$ boot repl -c -p 8230
Implicit target dir is deprecated, please use the target task instead.
Set BOOT_EMIT_TARGET=no to disable implicit target dir.
REPL-y 0.3.7, nREPL 0.2.12
Clojure 1.8.0
Java HotSpot(TM) 64-Bit Server VM 1.8.0_51-b16
<help cut>
boot.user=> (dirac! :version)
Dirac nREPL middleware v0.3.0.
boot.user=> (dirac! :join)
Your session joined Dirac (ClojureScript). The specific target Dirac session will be determined dynamically according to current matching strategy.
Listing Dirac sessions which are "most recent Dirac session":
* unidentified| |Chrome/52.0.2725.0|Mac/10.11.4 [17434885-6abf-4120-9e68-8e61ffa523c3]
To quit, type: :cljs/quit
boot.user=> (type js/window)
#object[Window "function Window() { [native code] }”]
looks like thats good. thanks. so Cursive refuses to connect for some reason.
hooray got it working! thanks @darwin @jupl, not sure why it wasn’t connecting initially.
btw. that “unindetified” tag is because I wrote support for detecting project names only for leiningen projects if there is some way how to read boot project name, patches welcome: https://github.com/binaryage/dirac/blob/master/src/runtime/dirac/runtime/prefs.clj#L4
you can also call (dirac.runtime/set-pref! :runtime-tag “something”)
prior calling (dirac.runtime/install!)
it is not important, just nice-to-have for cases when you have multiple dirac REPL sessions and you want to distinguish between them
ah. and @superstructor you don’t need two terminals in the bottom-left area, the left-most one still works as REPL, the prompt is just hidden, I think
@darwin: oh I run a bunch of other stuff in that boot task, e.g. cljs.test execution, which may or may not be a good thing.
on our UI projects (this specific one is not) there is - cljs incremental compilation and reagent being reloaded on the page on change - nrepl (Dirac now) - garden being compiled to css and injected into the page on change - cljs.test execution etc
so that dev task does a lot