Fork me on GitHub
#cider
<
2017-02-15
>
benedek06:02:08

@darnok anything cider related in your ~/.leiningen/profiles.clj? if so remove it and try again

darnok07:02:40

I don’t even have profiles.clj 🙂.

benedek07:02:35

haha ok, i should have asked first if you use cider-jack-in or cider-connect?

darnok08:02:12

I use cider-jack-in (C-c M-j).

darnok08:02:08

This is how cider calls leiningen: /usr/local/bin/lein update-in :dependencies conj [acyclic/squiggly-clojure "0.1.7"] -- update-in :dependencies conj [org.clojure/tools.nrepl "0.2.12" :exclusions [org.clojure/clojure]] -- update-in :plugins conj [refactor-nrepl "2.3.0-SNAPSHOT"] -- update-in :plugins conj [cider/cider-nrepl "0.15.0-SNAPSHOT"] -- repl :headless

darnok08:02:27

I took it from ps ax.

darnok08:02:50

I switched to cider-0.15.0-SNAPSHOT, that’s why there is [cider/cider-nrepl “0.15.0-SNAPSHOT”] in the command.

kurt-o-sys08:02:51

injecting cider middleware using boot... Well, I used to have a profile.boot file that looked like:

(require 'boot.repl)

  (swap! boot.repl/*default-dependencies*
         concat '[[cider/cider-nrepl "0.13.0"]])

  (swap! boot.repl/*default-middleware*
         conj 'cider.nrepl/cider-middleware))
Following the instructions https://github.com/clojure-emacs/cider-nrepl#via-boot , this should work as well:
(set-env! :dependencies '[[org.clojure/tools.nrepl "0.2.12"]
                          [cider/cider-nrepl "0.14.0"]])

(require '[cider.tasks :refer [add-middleware]])

(task-options! add-middleware {:middleware '[cider.nrepl.middleware.apropos/wrap-apropos
                                             cider.nrepl.middleware.version/wrap-version]})
Well, it doesn't 🙂. This is the result if I want to start my application with the latter profile.boot:
$ boot run
Retrieving cider-nrepl-0.14.0.pom from 
Retrieving cider-nrepl-0.14.0.jar from  (331k)
   clojure.lang.ExceptionInfo: Could not locate cider/tasks__init.class or cider/tasks.clj on classpath.
    data: {:file "/tmp/boot.user4842850808872874474.clj", :line 7}
java.io.FileNotFoundException: Could not locate cider/tasks__init.class or cider/tasks.clj on classpath.
                                ...                                        
Where did I go wrong?

benedek10:02:34

@darnok looks right to me 😕 can you try removing flycheck-clojure?!

darnok10:02:02

@benedek wow. it’s ok now 🙂. how are they related?

darnok10:02:51

oh, ok. I know now. it’s because of squiggly.

darnok10:02:55

should I report it as a bug to squiggly?

benedek10:02:15

@darnok report to squiggly: yes, pls. is just a guess but there could be some kind of dependency clash… both cider-nrepl and refactor-nrepl use source inlining to avoid dependency clashes but it seems that squiggly does not...

benedek10:02:20

just a guess really tho...

darnok10:02:49

ok, I’ll create a ticket. what is source inlining?

benedek10:02:33

basically prefixing all the dependencies recursively so you can use multiple versions of the same thing. and your deps won’t interfere with other dependencies.. kinda important for leiningen plugins as they can easily clash with the project dependencies...

benedek10:02:55

hope that makes sense...

darnok10:02:00

yes. thanks 🙂.

richiardiandrea15:02:25

@kurt-o-sys the patch for add-middleware is available only in 0.15.0-SNAPSHOT

kurt-o-sys15:02:50

@richiardiandrea oh... ok, thanks!

featalion16:02:57

hi all. I have a problem with buffer loading / evaluation and multimethods. For example, I have

(defmulti my-multi (fn [switcher _] switcher))

(defmethod my-multi :first
  [_ arg1]
  (do-something-first arg1))

(defmethod my-multy :second
  [_ arg1]
  (do-something-second arg1))
I update it to
(defmulti my-multi (fn [switcher _ _] switcher))

(defmethod my-multi :first
  [_ arg1 arg2]
  (do-something-first arg1 arg2))

(defmethod my-multy :second
  [_ arg1 arg2]
  (do-something-second arg1 arg2))
then I load / eval buffer with C-c C-k (`cider-load-buffer`), or with cider-eval-buffer. But when method is called, I get clojure.lang.ArityException. The code lays in one file (and namespace), but is called from another. I tried to load / evaluate both buffers, but it doesn't help. Also, code is called from core.async if it matters.

featalion16:02:54

it is pretty uncomfortable to restart Clojure REPL each time I change arity of multimethod...

dpsutton16:02:50

ask in the clojure channel

dpsutton16:02:01

i think this is just one of the pain points of multimethods but i'm not positive

featalion16:02:21

ok, I will ask

residentsummer16:02:56

had the same experience with mmetods long ago - I believe it’s how they are implemented in clojure

austinbirch17:02:55

Hi all, Does anybody know if an equivalent to this is expected to work in cider when using company-mode? I can only get completions for the rest of the path (e.g. java.io.FileN offers -> java.io.FileNotFoundException completion, but FileN results in no candidates) http://bytopia.org/2015/03/06/smart-classname-completion-for/