Fork me on GitHub
#cider
<
2015-10-19
>
wagjo09:10:43

Hi, cider reloads my namespaces upon cider-connect and that redefines some protocols and existing deftypes no longer works. Any workaround for this?

malabarba09:10:41

wagjo: cider shouldn't load anything on connect

malabarba09:10:50

that's probably some other package

malabarba09:10:04

maybe squiggly-clojure or refactor-nrepl

wagjo09:10:17

I'm using boot with refactor-nrepl and cider-nrepl

malabarba09:10:46

One workaround for that would be to wrap those definitions in a close

malabarba09:10:29

(when (not (resolve 'my-deftype)) (deftype my-deftype))

bozhidar15:10:05

still, cider doesn’t load anything on connect

bozhidar15:10:38

something which illustrates/reproduces the problem better would be useful

wagjo15:10:08

maybe it's caused by someting in spacemacs?

benedek15:10:35

refactor-nrepl does eagerly build ASTs for the namespaces in the project. we also use an AST building endpoint in tools.analyzer which does eval your code too (otherwise we don’t get a meaningful AST)

benedek15:10:23

so not 100% if your problem is related but you can try to remove refactor-nrepl. if the problem disappears pls do create a github issue for us with some description

wagjo15:10:52

thanks, I'll try

wagjo16:10:13

maybe you should change order in which you eval namespaces

benedek16:10:02

what version of refactor-nrepl are you using?

wagjo16:10:59

2.0.0-SNAPSHOT. When I remove refactor-nrepl it works OK. With refactor-nrepl, upon cider-connect all namespaces are reloaded, as I can see reflection warnings being print again in console.

bozhidar16:10:18

ok, so at least we narrowed down the problem

blueberry16:10:56

I too had deftype-related compilation problems when refactor-nrepl is present. Removing it solved the problem.

benedek17:10:04

@wagjo @blueberry can you create a github issue pls with some context in it

blueberry20:10:21

Sorry, I can not do it now, since I do not really use clj-refactor. I just included it in the project, had issues with it, and decided I can live without it as I have for all these years, until it is fixed.