This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-07-04
Channels
- # beginners (8)
- # boot (20)
- # cider (8)
- # cljs-dev (263)
- # cljsjs (8)
- # cljsrn (20)
- # clojure (151)
- # clojure-argentina (1)
- # clojure-belgium (7)
- # clojure-dev (18)
- # clojure-italy (25)
- # clojure-spec (34)
- # clojure-uk (15)
- # clojurescript (89)
- # component (45)
- # core-async (27)
- # cursive (16)
- # datomic (53)
- # emacs (40)
- # figwheel (3)
- # hoplon (62)
- # jobs (1)
- # jobs-discuss (7)
- # luminus (8)
- # lumo (60)
- # off-topic (3)
- # parinfer (1)
- # precept (1)
- # protorepl (15)
- # re-frame (37)
- # reagent (7)
- # ring (3)
- # ring-swagger (73)
- # slack-help (1)
- # specter (19)
- # sql (4)
- # test-check (10)
- # uncomplicate (2)
- # unrepl (14)
- # untangled (52)
- # vim (5)
- # yada (42)
hey yall, looking for some info about cider-refresh - it doesn't appear to honor an earlier call to set-refresh-dirs for me
is there a way to set up the refresh-dirs in cider's config perchance?
@featheredtoast cider-nrepl doesn't expose a set-refresh-dirs for it's version of tools.namespace (it uses a private copy)
In boot using cider-nrepl 0.15.0 snapshot, my jump to source seems to be going to the temporary directories in boot. Using the ops raw I get:
[{'status': ['done'], 'file': 'file:/home/dominic/.boot/cache/tmp/home/dominic/src/github.com/foo/bar
/a9/-m7ldk0/foo/bar/baz.cljs', 'name': baz', 'column': 1, 'id': 'fireplace-bian
ca2-1499151061-107', 'session': '6cf8e95c-33cc-4fc8-bd78-1aba3f6fd9cc', 'ns': 'foo.bar.baz', 'line'
: 15, 'arglists-str': '[uuid benefit at]'}]
which suggests this is a problem at the cider level.
It seems to work OK in clojure files. Just not for cljs.
Am I being daft, or should I raise an issue?Looks like cljs & clj :file
metadata is quite different which could cause the discrepancy.
(update :file
(fn [f]
(str
(let [path (java.nio.file.Paths/get f (into-array String []))]
(loop [n 0]
(if (= n (.getNameCount path))
:give-up
(let [x (.subpath path n (.getNameCount path))]
(if ( (str x))
x
(recur (inc n))))))))))
@richiardiandrea this fixes it for info-cljs
. It's a bit of a hack (I think my loop-recur is non-idiomatic & should be replaced with a reduce over (range)
or something). It could also validate that the absolutePath of the resource is the same as f
to reduce false positives.@dominicm I'm trying to work around https://github.com/clojure-emacs/cider-nrepl/issues/376 https://dev.clojure.org/jira/browse/TNS-45 https://github.com/stuartsierra/component/issues/45#issuecomment-245052313 - my component works in the repl after a call to set-refresh-dirs
to exclude the user ns, but I cannot currently configure the same workaround in cider-refresh.
@featheredtoast if you're desperate you could try calling the same function on CIDER's private copy of tns