Fork me on GitHub
#cider
<
2018-02-26
>
dpsutton00:02:39

Yeah that seems to be something that has to happen on day one though. I think rust is trying to introduce something like that but it's optional to not create noisy commits

bozhidar01:02:53

@iwannaseethelight Well, there’s cljfmt and you can use it for the indentation, but unfortunately it doesn’t support indentation metadata yet.

bozhidar01:02:14

Ultimately we hoped that more editors would support our idea for indentation metadata.

bozhidar01:02:34

@donmullen I think it’s now cider.nrepl/wrap-apropos if memory serves. Guess you have some code referring to the old ns of the middleware in question.

wusticality04:02:35

hey so quick question

wusticality04:02:35

when I call cider-load-buffer, it does not appear to reload namespaces included in that file if they have been reloaded previously

wusticality04:02:14

this caused a few hours of frustration - I tried loading namespace a, which loaded b - I had changed something in b and expected it to be picked up when I reloaded a but that is not standard behaviour seems like

wusticality04:02:38

is there some setting to force reloading a buffer to also reload all dependent namespaces recursively?

dpsutton04:02:27

haven't looked it up before but deep in require it won't reload them for you https://github.com/clojure/clojure/blob/clojure-1.9.0/src/clj/clojure/core.clj#L5880. however, you can set this reload-all flag with

(defun cider-refresh (&optional mode)
  "Reload modified and unloaded namespaces on the classpath.

With a single prefix argument, or if MODE is `refresh-all', reload all
namespaces on the classpath unconditionally.

dpsutton04:02:20

which for me is bound to C-c C-x

wusticality04:02:17

it was the source of lots of errors

wusticality04:02:25

i’m really surprised it’s not default behaviour tbh

wusticality04:02:07

also unfortunately it tries to load special stuff in the project that is intellij specific so it dies

wusticality06:02:27

anyone know if it’s possible to instrument cider-load-buffer to force the reloading of all dependent namespaces?

wusticality06:02:04

i’m also curious if there’s a buffer-local variable I can use to display the current namespace in a header or something

wusticality06:02:45

i managed to do it with cider-current-ns

wusticality06:02:02

let me know if anyone has a solution to my cider-load-buffer question, and thanks in advance 🙂

bozhidar08:02:54

Well, that’s the common behaviour of Clojure, so it’s kind of what’s expected. You can use cider-refresh to reload all namespaces that got changed.

bozhidar08:02:43

Typically when I make changes to the required namespaces I just evaluate them as well, so I rarely need to refresh anything. I guess it’s often a matter of habit and the way you work.

wusticality09:02:14

unfortunately refresh won’t work as the project includes a bunch of ide-specific clojure (don’t ask me why)

xiongtx23:02:13

IDE-specific stuff should go into a profile that you can exclude.

dominicm15:02:11

https://img.shields.io/badge/Accretion-Guaranteed-green.svg I've solved the problem. CIDER will integrate with any library that has this badge!