Fork me on GitHub
#calva
<
2019-04-03
>
lspector04:04:52

I just realized that I'm not getting symbol completion or documentation in the new project I made for the tests/discussion above, but I do still get them when I open an existing, real project. Is there something that has to be done for this to work, which maybe I did on the existing project for this or some other reason, but have since forgotten?

pez04:04:15

It's some dependency that is not met. On the first page on the wiki there is a command line you can use to start your repl. It will inject the needed dependencies.

lspector16:04:23

Ah -- I thought it must be too when I read this, since I've generally skipped/forgotten about the dependencies since I think they're in my existing projects for other reasons. Experimenting, though, it turns out that I don't need to add any dependencies beyond Clojure. The problem was that it was auto-connecting to some other server that I must still have running from some other tinkering. If I re-connect with the port printed from starting a fresh REPL, then it behaves as it should 🙂

lspector16:04:20

FWIW according to the wiki I shouldn't have to add the nrepl dependency, since I'm using leiningen, but I should have to add cider-nrepl. But it seems that I don't, unless I'm missing something. What might I be missing, or is there something else that might be going on here?

pez16:04:22

Sounds like I was drunk when editing the wiki. 😀

pez17:04:08

What kind of project are you using it with? It might have the needed dependencies already.

lspector22:04:34

I think I created it with lein new calvatest. project.clj is:

(defproject calvatest "0.1.0-SNAPSHOT"
  :description "FIXME: write description"
  :url ""
  :license {:name "EPL-2.0 OR GPL-2.0-or-later WITH Classpath-exception-2.0"
            :url ""}
  :dependencies [[org.clojure/clojure "1.10.0"]]
  :repl-options {:init-ns calvatest.core})

mseddon22:04:33

We definitely assume cider-nrepl to provide a lot of functionality. Without it you will lose things like autocomplete. We are pushing hard towards injecting the dependency we need, allowing you to just launch a session with whatever profiles you want enabled. This should be in the next major release coming soon, with the ability to invoke a cider like jack-in, "fire and forget".

mseddon22:04:09

I am not at a computer atm but suggest you add a cider-nrepl dependency. I will report tomorrow what version we currently expect.

mseddon23:04:47

We are aiming for the end experience to just be "launch my project" and not force you to worry about trivia like this.

mseddon23:04:48

Cider-nrepl imports nrepl, so it ought to just work if you import it (your project doesn't currently so it seems that archetype should be updated), but I am happy to work through that with you. Note the plan is, like cider that Calva will just automatically add that dep itself soon, which will also improve cross-editor support. After all, we don't want to start commit wars in project.clj

mseddon23:04:41

A lot of the magic is handled by the cider-nrepl middleware

mseddon23:04:30

cider/cider-nrepl 0.20.0 is what we are currently expecting. See if adding that helps. There are a lot of changes coming upstream from nrepl 0.6 that may break us beyond that for now, but we'll be at parity shortly.

mseddon23:04:21

Unfortunately there are issues with the JavaScript EDN libraries which prevent us from scanning a lein project and usefully allow you to select profiles. We are working hard behind the scenes to make Calva far more user friendly. We will be using the official cljs edn parser for this, which will fix the issue. Ultimately like a cider user, there is no legitimate reason you should be expected to worry about these details, especially adding cider-nrepl, and you won't have to. Bare with us 😁