Fork me on GitHub

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/
/a9/-m7ldk0/foo/bar/baz.cljs', 'name': baz', 'column': 1, 'id': 'fireplace-bian
ca2-1499151061-107', 'session': '6cf8e95c-33cc-4fc8-bd78-1aba3f6fd9cc', 'ns': '', '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]
                      (let [path (java.nio.file.Paths/get f (into-array String []))]
                        (loop [n 0]
                          (if (= n (.getNameCount path))
                            (let [x (.subpath path n (.getNameCount path))]
                              (if ( (str 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 - 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