Fork me on GitHub
#cider
<
2019-02-11
>
dpsutton02:02:28

Where are you throwing an error message

mikepjb08:02:56

Is there an option to split the REPL input/output like Timothy Baldridge does in his core.async talk? https://www.youtube.com/watch?v=enwIIGzhahw

practicalli-johnny10:02:01

@mikepjb as Timothy states at 2.19 into the video, he has the *nrepl-server* buffer open as well as the repl buffer because he claims there is a feature of nrepl with threads that prints the output to the nrepl-server buffer instead of the repl buffer. I didnt have this issue the last time I used core.async (more recently than this video). The easiest way to split input and output (IMHO) is to just evaluate in the source file, but I appreciate that is not what you are asking (for which I dont have an answer)

jumar10:02:28

I'm not sure if it's spacemacs-related or cider-related but I'm getting this error when trying to navigate to a test buffer from the "prod" buffer: project type 'generic' not supported Any idea what might be wrong?

jumar10:02:58

this happens in multiple (at least two) clojure projects

practicalli-johnny10:02:19

@U06BE1L6T How are you trying to navigate to the test buffer? I use SPC p a without any issues

jumar10:02:31

that's what I use too

jumar11:02:36

Maybe it's related to the fact that my leiningen projects are actually in a subdirectory of the "project" (I created an empty .projectile file in parent dirs)

practicalli-johnny11:02:50

Used SPC p a on two different versions of Spacemacs develop (one just updated yesterday) and both worked without issue.

practicalli-johnny11:02:29

Ah, the .projectile file sounds like a good candidate

jumar11:02:57

Yeah, it actually works for me on a "shallow structure" - project like this: https://github.com/jumarko/clojure-experiments

jumar11:02:42

BUT it doesn't work if the lein project root dir is nested - like this: https://github.com/jumarko/functional-design-in-clojure

practicalli-johnny11:02:12

Projectile should use git, so if each Clojure project has its own .git folder , then you should just be able to remove the .projectile. If its all one mono-repo then does putting a .projectile file in the root of each Clojure project help fix switching to tests ?

jumar11:02:05

Removing .projectile could work in the example I posted but for another project at work I have multiple git repos in a single "project" and I want to be able to work with them as such.

practicalli-johnny11:02:23

If you remove the .projectile file to the twitter folder in your functional-design-in-clojure project, then SPC p a works

practicalli-johnny11:02:42

Obviously this is going to limit any projectile actions to the contents of that twitter folder

practicalli-johnny11:02:33

My approach to having multiple project in one repo would be to use git sub-modules http://jr0cket.co.uk/2014/05/git-submodules-pros-and-cons.html

jumar11:02:11

Yes I got it - it works if I remove the .projectile file 🙂. But it doesn't work in case I have multiple git projects under the same projectile project. Git submodules are an interesting idea but I don't want to use them now. Maybe there's an alternative approach how to set project type manually?

Macroz11:02:51

when I use the latest cider plugin for emacs I get nrepl 0.5.3 forced to me which doesn't seem to work with Leiningen 2.9.0 when I run lein repl I get the nrepl 0.6.0 which seems to work just fine. The error I get is long with lots of Error loading cider.nrepl: Syntax error compiling at (cider/nrepl.clj:1:1). but the cause is Caused by: java.lang.RuntimeException: Unable to resolve var: cider.nrepl/wrap-apropos in this context

👍 10
Macroz11:02:35

it worked just fine with Leiningen 2.8.3

Hukka11:02:54

I have the same thing, except my lein repl is also broken, because cider-nrepl is in my lein profile, because I use vim

Macroz11:02:33

my cider version is 20190125.1339

Hendrik Poernama11:02:55

I just came across this, steps to reproduce: - have cider-nrepl 0.20.0 in ~/.lein/profiles.clj - have leiningen version 2.9.0 - create a project lein new cider-test - lein repl breaks with error described above

Macroz11:02:28

lein downgrade 2.8.3 is the work saviour here

❤️ 5
Macroz11:02:45

it's not advertised much anywhere 🙂

Hendrik Poernama11:02:12

trying to debug this, but the error message is really hard to understand

Macroz11:02:55

wrap-apropos package was moved recently?

Macroz11:02:28

so new leiningen gives later nrepl which looks for a dependency with a different name?

Macroz11:02:06

used to be cider.nrepl.middleware.apropos/wrap-apropos but now cider.nrepl/wrap-apropos?

Macroz11:02:10

something like that?

Macroz11:02:12

just guessing

Macroz11:02:37

so I guess I have to wait for a new cider release to get nrepl 0.6.0 to work with leiningen 2.9.0

Michael Griffiths16:02:18

I’ve released [cider-nrepl "0.21.0"] now with support for nREPL 0.6.0 – client release still to come once https://github.com/clojure-emacs/cider/pull/2579 is merged

👏 10
Macroz12:02:18

nice, thanks a lot

dpsutton12:02:22

I had no idea that a newer lein was out

dehli16:02:27

Hi! Are there issues when using the cljs repl and macros?

dehli16:02:18

For example, the following code prints out both Will print and Will not print

(defmacro unless [pred a b]
  `(if (not ~pred) ~a ~b))

(unless false (println "Will print") (println "Will not print"))

dpsutton16:02:01

[dan@fedora experiments]$ clj -m cljs.main -r
ClojureScript 1.10.516
cljs.user=> (defmacro unless [pred a b] `(if (not ~pred) ~a ~b))
#'cljs.user/unless
cljs.user=> (unless false (println "will print") (println "will not print"))
will print
will not print
(if (cljs.core/not nil) nil nil)
cljs.user=> 

dpsutton16:02:17

i think this is a cljs issue not a CIDER one

dehli16:02:32

Ahh, should have checked there first. Thanks! 🙂

dpsutton16:02:13

no worries. cljs macros make me a little nervous

dpsutton16:02:39

i think the state of the art is a clj file with the same name defining that macro and then your cljs file will work just fine

dehli16:02:16

Ahhh, I do remember having to do that before. It's been a while since I have written one

dpsutton16:02:16

I'm assuming that asking for a macro just makes a normal function? I'm assuming this explains what is seen here

dehli16:02:57

Ya, that could be. I'll go the .clj route. Thanks again!

👍 5