Fork me on GitHub
#leiningen
<
2016-02-11
>
andrei20:02:57

hello! if anyone from here can help, I have a strange issue, repl is not available for test profile ..

> lein with-profile test repl
Warning: no nREPL dependency detected.
Be sure to include org.clojure/tools.nrepl in :dependencies of your profile.
Error loading clojure.tools.nrepl.server: Could not locate clojure/tools/nrepl/server__init.class or clojure/tools/nrepl/server.clj on classpath: 
Error loading complete.core: Could not locate complete/core__init.class or complete/core.clj on classpath: 

andrei20:02:06

I really don’t get what can cause this...

andrei20:02:43

my deps are pretty simple

:dependencies [
    [org.clojure/clojure "1.6.0"]
    [ring/ring-core "1.4.0"]
    [environ "1.0.2"]
    [clj-http "2.0.0"]
    [org.clojure/data.json "0.2.6”]]

 ; …

  :profiles {
    :dev {
      :dependencies [[midje "1.8.3" :exclusions [potemkin clj-time]]]
      :plugins [[lein-midje "3.2"]]
    }
  }

akiva20:02:04

You need to have org.clojure/tools.nrepl in your dependencies.

akiva20:02:44

I keep mine in a :repl profile in ~/.lein/profiles.clj.

andrei21:02:24

and this is normal? I updated some libs and removed lein-git-deps, and only since then, repl is not there for test profile

andrei21:02:04

I thought I broke something

akiva21:02:34

I can’t attest to ‘normal’ but that’s what the error is saying. I’ve kept a profiles.clj for a long time, though.

akiva21:02:50

{:repl {:dependencies [[org.clojure/tools.nrepl "0.2.12"]]

        :plugins [[cider/cider-nrepl "0.11.0-SNAPSHOT"]
                  [refactor-nrepl "2.0.0”]]}

akiva21:02:29

It gets processed each time you spin up a REPL.

andrei21:02:10

I see, although in my case this works

lein with-profile test,base repl
nREPL server started on port 55182 on host 127.0.0.1 - 
REPL-y 0.3.7, nREPL 0.2.12

andrei21:02:43

I don’t get why base profile is being remove from the test one

akiva21:02:10

If you specify a particular profile, the others are ignored except for, I think, user.

andrei21:02:41

now that answers it

andrei21:02:48

thank you simple_smile

akiva21:02:04

Glad to be of help.

nberger22:02:49

@andrei: @akiva: you can also use with-profile +test so the others are not ignored. See https://github.com/technomancy/leiningen/blob/master/doc/PROFILES.md#activating-profiles for more info

akiva22:02:08

Ah! Nice to know.

andrei22:02:41

thanks :thumbsup: