Fork me on GitHub
#cider
<
2016-06-24
>
robert-stuttaford04:06:46

@benedek i'll give that a go, thank you!

robert-stuttaford04:06:34

it looks like that was it!!

robert-stuttaford04:06:45

well, that fixes that problem. i've got a new problem:

ERROR: Unhandled REPL handler exception processing message {:op clean-ns, :prefix-rewriting false, :debug false, :path [], :libspec-whitelist [^cljsns ^slingshot.test ^monger.joda-time ^monger.json], :prune-ns-form true, :session a8d7a0bb-203e-4372-84fb-4cbc40cd80af, :id 14}
java.lang.AssertionError: Assert failed: (seq path)
	at refactor_nrepl.ns.clean_ns$clean_ns.invokeStatic(clean_ns.clj:38)
i'll put refactor-nrepl src in my classpath and instrument and see what could be going wrong

benedek06:06:05

This could be an actual bug with clean ns

benedek06:06:40

Strange your path is empty

benedek06:06:57

So should be something in the elisp code...

robert-stuttaford06:06:54

i'll share news soon 🙂

benedek07:06:00

well it can be if the buffer does not have a file related to it.

benedek07:06:15

only those should be filtered out i guess….

benedek07:06:28

any chance you know what buffer is this?

helios08:06:20

is it normal that clj-refactor wants to analyze the project every time i do find-usages ?

benedek09:06:18

depends on your config.

benedek09:06:54

you can set (setq cljr-warn-on-eval nil) so it won’t ask you but analyze in the background

benedek09:06:48

if you let it analyze it will cache the results tho

benedek09:06:13

so next time it analyzes it should not take long as it only builds ASTs for changed files

benedek09:06:17

so to summarize: yes, but it should just use the already cached ASTs for most (not changed) namespaces

cskksc09:06:33

Is there any way to tell clj-refactor to exclude a specific directory (eg. test) when it tries to analyse all the files ?

benedek09:06:17

i don’t think there is at the moment. all clj files get analyzed on your classpath

cskksc10:06:56

alright. we have some custom readers in a project, and they’re referenced in some test files. clj-refactor is not able to parse that

benedek10:06:20

you can set cljr-ignore-analyzer-errors to t

benedek10:06:40

so clj-refactor will ignore errors in those ns-s and carry on with find-usages/rename symbol

benedek10:06:56

leaving these nses out obviously. kinda best effort really...

benedek10:06:36

that is not any worse than excluding some file tho either.

cskksc10:06:55

alright. that works for me. thanks!

robert-stuttaford10:06:17

@benedek: well, i'm running project-clean, where the file isn't in a buffer. with-temp-file, remember

robert-stuttaford10:06:28

or, otherwise, i don't understand enough about this to know what i'm talking about 🙂