Fork me on GitHub
#cider
<
2018-10-29
>
danielsz04:10:01

Experience report for using cider-nrepl with Boot, it's not enough to depend on the new nrepl , one needs to track down transitive dependencies on org.clojure/tools.nrepl and exclude them explicitly in build.boot. I've just spent time doing exactly that before things started working again. I hope this helps.

👍 4
dominicm06:10:57

In theory, it should be okay. But because of cider-nrepl's lazy loading of namespaces, if an old tools.nrepl is loaded, then the system goes boom 🙂

bozhidar07:10:48

That’s why it’s best to just upgrade to the latest version of Boot, as it should not have any transitive deps to tools.nrepl.

bozhidar07:10:28

Anyways, once the new Lein release is cut we’ll probably drop the conditional loading of namespaces, and just suggest to everyone to update the build tool.

danielsz13:10:38

What I'm saying is that even if you're running the latest Boot, which doesn't have dependencies on tools.repl, other dependencies in your app might have, and you need to track them down. In my case, it was ankha and dirac.

bozhidar13:10:53

Can you post links to those projects?

bozhidar13:10:59

I guess we’ll have to patch them.

bozhidar13:10:19

Btw, I wrote an post some of you might find interesting https://metaredux.com/posts/2018/10/29/nrepl-redux.html

cider 32
dominicm14:10:21

I don't see a dependency on tools.nrepl https://github.com/noprompt/ankha/blob/64423e04bf05459f96404ff087740bce1c9f9d37/project.clj Unless lein includes :dev deps? 😱

danielsz21:10:57

Right, I don't see it on master neither, but if you require [ankha "0.1.5.1-64423e"] in a Boot project and you then ask for the dependency graph, you'll see that it pulls in tools.nrepl.

danielsz21:10:00

Funny, there's a three year old ticket by somebody compaining about a dependency not listed in project.clj: https://github.com/noprompt/ankha/issues/28

futuro14:10:16

Does anyone know if there's a clj-refactor/clojure-mode/cider function to read the current namespace forms and add any missing require forms?

futuro14:10:44

I'm thinking of a situation where I've copy-pasted some chunk of code from one namespace to another, and now I have to add all of the missing require forms.

futuro14:10:27

Currently I've moved a large set of tests from one ns to another, and I'm hoping I don't have to hunt down the various ns-aliases.

richiardiandrea15:10:50

@futuro iirc there something like clean-ns

richiardiandrea15:10:28

Don't know about aliases to ns but it might be there too

richiardiandrea15:10:18

Maybe add-missing-require or something, will check when in front of a computer

futuro15:10:00

clean-ns is great for removing un-used require forms, but I'm hoping for something like add-missing-require (does that exist?) that could read the current buffer and add in any missing require forms given the ns-aliases used in the buffer.

richiardiandrea15:10:26

@futuro I found cljr-add-missing-libspec

dpsutton15:10:14

i'm having navigation issues in cljs when trying to jump to definition of something def'd of defn'd in the same ns. not sure if anyone else is seeing this

justinbarclay19:10:21

I’m having this issue as well

dpsutton20:10:38

👍glad its confirmed. i'll look into it tonight

justinbarclay20:10:46

Thank you, if there is anything I can do to help let me know :)

futuro16:10:24

@richiardiandrea I'll give that a look, thank you 🙂

👍 4
futuro16:10:31

@richiardiandrea That more or less solved it, so thank you!

futuro16:10:57

(It didn't read the whole buffer and automatically add missing libspecs, but it does it for the symbol under point, which is good enough 🙂 )

richiardiandrea16:10:47

yeah the former would be definitely useful...I was looking for some linting machinery without using a linter as well 😄

benedek19:10:18

happy to receive PRs @futuro :)

benedek19:10:09

you might also wan to look at magic requires

futuro19:10:54

Someday I'll have the time to help improve Cider @benedek, but in the mean time I'll just say thanks for making such a great tool 😄

simple_smile 4
dpsutton20:10:22

i'm going to look into it tonight but glad to see it is confirmed