Closed darkleaf closed 6 years ago
Only c.t.n 0.3 alpha uses clojure.java.classpath/classpath-directories
. 0.2.11, which is still used by cider-nrepl, has it's own code which doesn't work with Boot, if I remember correctly. I have used 0.3 alpha without set-refresh-dirs
successfully.
Ah, versions. It's my mistake. Thanks!
cider-nrepl
uses stable version of c.t.n and version hardcoded by thomasa/mranderson
.
So I write workaround solution for stable version.
(ns user) ;; ns for repl
(defn setup-class-path []
(let [separator (System/getProperty "path.separator")
re-separator (re-pattern separator)
curr-class-path (System/getProperty "java.class.path")
curr-class-path-items (clojure.string/split curr-class-path re-separator)
dirs (get-env :directories)
new-class-path-items (distinct (into curr-class-path-items dirs)) ;; distinct for idempotence
new-class-path (clojure.string/join separator new-class-path-items)]
(System/setProperty "java.class.path" new-class-path)))
(setup-class-path)
I manually setup "java.class.path". It's work. @Deraen, is this solution correct?
I guess that works. Not sure if setting java.class.path
some undesired other side-effects?
It is also possible to call set-refresh-dirs
for c.t.n prefixed by mranderson, at least on 0.13 it is available as cider.inlined-deps.clojure.tools.namespace.repl/set-refresh-dirs
.
This will be fixed by the next CIDER release containing https://github.com/clojure-emacs/cider-nrepl/pull/396
That release is now out, I expect this to work.
Can anyone report back if this issue has been resolved?
And is this perhaps related to https://github.com/boot-clj/boot/issues/632?
This is fixed for me using the api from vim. I fully exist this to work.
On 21 December 2017 22:06:38 GMT+00:00, Martin Klepsch notifications@github.com wrote:
Can anyone report back if this issue has been resolved?
And is this perhaps related to https://github.com/boot-clj/boot/issues/632?
-- You are receiving this because you commented. Reply to this email directly or view it on GitHub: https://github.com/boot-clj/boot/issues/524#issuecomment-353469587
-- Sent from my Android device with K-9 Mail. Please excuse my brevity.
Alright, closing this since @SevereOverfl0w said it works. If it doesn't please feel free to reopen.
Hi!
I use last cider, last cider-nrepl(v0.14.0) and last boot(2.6.0).
I read https://github.com/boot-clj/boot/wiki/Repl-reloading and this solution work for
clojure.tools.namespace.repl
. I want to usecider-refresh
function inside emacs for repl reloading. But it dont't work becausecider-nrepl
don't useclojure.tools.namespace.repl
internally.cider-nrepl
useclojure.tools.namespace.dir
directly instead.I don't understand why I need specify classpath manually by
repl/set-refresh-dirs
.clojure.tools.namespace.dir
useclojure.java.classpath/classpath-directories
if dirs is empty. But(get-env :directories)
equivalent(clojure.java.classpath/classpath-directories)
How can I use cider-refresh with boot?
PS.
cider-nrepl
usethomasa/mranderson
plugin so this plugin compile dependencies and add prefix for namespaces so we can't access tocider-nrepl
deps.