Fork me on GitHub
#cider
<
2019-06-18
>
bozhidar09:06:13

> the inspector is half way there, but the datafy/nav protocols are really what makes REBL interesting

bozhidar09:06:58

Yep, we do plan to leverage it at some point, but there’s never enough time for everything. I think this won’t be hard. //cc @alexyakushev.

bozhidar09:06:21

> still pretty printing never worked for me in clojurescript

bozhidar09:06:15

@carkh I can’t imagine why it wouldn’t work, as it’s not tied to ClojureScript in any way. What exactly happens for you?

carkh09:06:13

@bozhidar it just prints with syntax highlight and all, but no pretty printing

bozhidar09:06:44

Can I see the nREPL message exchange for you?

bozhidar09:06:32

As this is baked straight into nREPL it should be impossible for it not to work unless the request doesn’t contain a printing function.

carkh09:06:00

Buffer *cider-nrepl ...* doesn-t have much data where can i find those messages?

carkh09:06:29

*nrepl-server ....* is only command line stuff, that's what you want ?

carkh09:06:56

in this last example i eval a long edn data in clojurescript (in cider repl), it is not pretty printed, then i exit clojurescript, and evaluate the same edn in clojure, it is now pretty printed

carkh09:06:14

i'm using cider-jack-in-cljs "C-c M-J" with shadow-cljs (had the same trouble with figwheel)

carkh09:06:34

the one thing that's special about my setup is that i'm on windows

bozhidar13:06:53

I guess I should have explained first what the message log is. 🙂

carkh13:06:36

i'm right on it

carkh14:06:32

that's the same example edn than before

bozhidar14:06:39

@carkh What’s your CIDER and nREPL versions?

bozhidar14:06:53

Also - what’s your piggieback version?

bozhidar14:06:12

I recall there was some nasty bug in 0.4.0 that was related to the printing.

carkh14:06:13

;; CIDER 0.22.0snapshot (package: 20190419.1025), nREPL 0.6.0

carkh14:06:50

should be fairly recent

bozhidar14:06:12

Yeah, that’s pretty recent.

bozhidar14:06:18

What about piggieback?

carkh14:06:35

mhh let me find out

carkh14:06:07

that isn't bundled with cider ?

carkh14:06:14

maybe with shadow-cljs ?

bozhidar14:06:32

Ah, actually shadow-cljs doesn’t use piggieback.

bozhidar14:06:47

And I think we solved the mystery. 🙂

bozhidar14:06:16

Probably shadow doesn’t play nice with the printing changes in nREPL 0.6.

carkh14:06:35

hum i had those problems with figwheel, but that's a good while back so i guess it might be fixed in this case

carkh14:06:02

i'll have to check that out =)

bozhidar14:06:09

I’m reasonably certain that if you start some cljs REPL using say figwheel or something simpler like nashorn the printing might actually work.

carkh14:06:36

i'll check that and keep you updated

bozhidar14:06:26

You might also open some GitHub issue for @thheller pointing him to https://github.com/nrepl/piggieback/commit/8e0ff8911a1a7ad012dba19d3be6d7c0515d418d and subsequent commits. Changes that had to be done for Piggieback to play well with nREPL 0.6.

carkh14:06:57

i'll do that as soon as i see problems were fixed for regular clojurescript

carkh14:06:51

@bozhidar ah indeed that works now with figwheel

carkh14:06:57

thanks for your help

bozhidar14:06:16

You’re welcome!

Drew Verlee17:06:54

is there a functional equivalent to cider-quit -> cider-jack-in. Not that two strokes is a big deal. i have given up on trying to dynamically adding libs to my project, it seems to break or at least its giving me anxiety 🙂.

dpsutton17:06:51

hit , in the repl and you can "restart"

dpsutton17:06:13

cider-restart bound for me at C-c M-r

Schmoho17:06:07

I had this issue with CIDER lately - when I use lein on jack-in I don't start in the main namespace of the lein project and the user-ns has no clojure.repl-ns preloaded. I was told this should not be so, but I wanted to be sure, so could someone tell me whether this is indeed unexpected behaviour?

ghadi17:06:17

is there a way for command history to persist across restarts @dpsutton?

dpsutton17:06:30

command history = repl history?

dpsutton17:06:56

or the command used to invoke clj/lein/boot/etc ?

ghadi17:06:03

repl history

dpsutton19:06:15

@U050ECB92 did you get it solved?

ghadi19:06:29

haven't tried yet, but tysm for responding

dpsutton19:06:40

👍 always happy to help

dpsutton17:06:19

ah, i think repl history should be preserved with a simple boolean. let me check

dpsutton17:06:44

cider-repl-history-file seems like it needs a filename. if you set that presumably it will write stuff there?

dpsutton17:06:10

we have multiple projects at the same root including a cljs version. seems repl history does not discriminate there. not sure if that will be a pain point for you

kingcode17:06:53

I just upgraded to Cider 0.21 - from 0.15, now my environment seems trashed, both for clj and cljs. I am getting the following in my mini-buffer: ‘cider-jack-in-cljs’ requires the nREPL op “classpath” (provided by-cider-nrepl) Any idea how to fix this? Thx..

dpsutton17:06:30

what's your lein version?

dpsutton17:06:52

do you have cider-nrepl version injected by CIDER or do you have it in project.clj or in your lein profiles?

dpsutton17:06:42

@d.eltzner what version of lein/CIDER are you using?

dpsutton17:06:46

that diff is terrifying lol

Schmoho17:06:05

@dpsutton i just skimmed over the emacs cider-customizations, there does not seem to be any particular opt that would control what you last asked - how would one configure what nrepl-version cider uses? as to my question, lein 2.9.0, cider nrepl is 0.21.1

dpsutton17:06:28

unless you specify something it will inject what it needs

dpsutton17:06:44

looks like that fix is already applied buy not released yet. if you get from melpa (22.0snapshot) you'll have it though

Schmoho17:06:06

I know really little about elisp, so what exactly did you mean it's terrifying? is this diff something that should/could have been obvious to me, or is it that it actually takes string "nil"?

dpsutton17:06:46

its very "spooky". (nrepl--eval-request "nil") vs (nrepl--eval-request "")

dpsutton17:06:02

the code is very readable. the intent and implications of it is what's scary

Schmoho17:06:47

yeah i think i kind of see that.

kingcode17:06:00

@dpsutton I am using lein 2.8.1, and just saw from lein --version, that ‘cider-nrepl’ requires 2.8.3+. I will try that and see what happens….thx

dpsutton17:06:44

this happens because CIDER switched from tools.nrepl -> nrepl/nrepl. Check your deps for that and you may need to bump. They are poisonous to each other

kingcode17:06:49

@dpsutton yeah indeed, I tried first removing nrepl decls from my profiles.clj, to no avail…

kingcode17:06:30

Funny…emacs is frozen when I try jack-in-clj, with “Direct connection to localhost:xxx established”, but when I started jack-in-clj/cljs, the cljs console comes up fine, and an error with clj-refactor middleware came up

kingcode18:06:22

Have to kill my emacs process and restart..

dpsutton18:06:02

one thing to try: check *Messages* buffer for the startup invocation lein .... copy and paste that into a terminal and see what it says

kingcode18:06:52

@dpsutton The relevant line in Messages buffer: [nREPL] Starting server via /Users/kingcode/bin/lein update-in :dependencies conj \[nrepl\ \“0.6.0\“\] -- update-in :dependencies conj \[cider/piggieback\ \“0.4.0\“\] -- update-in :plugins conj \[refactor-nrepl\ \“2.4.0\“\] -- update-in :plugins conj \[cider/cider-nrepl\ \“0.21.1\“\] -- repl :headless :host localhost... [WARNING] No nREPL middleware descriptor in metadata of #’refactor-nrepl.middleware/wrap-refactor, see nrepl.middleware/set-descriptor! nREPL server started on port 54819 on host localhost - <nrepl://localhost:54819>

Schmoho18:06:36

it is more of an emacs question, but i really fail trying to do that upgrade. first i cant find out which melpa snapshot i am referring with neither http://melpa.org and emacs, then upgrading in package-list-packages did nothing and downloading and replacing cider 20190216.2255 by hand broke cider badly, so was probably a stupid idea - and replacing it back with the old version left packages-list-packages saying it was deleted although cider at least works fine now. soooo ... how does emacs work?

Schmoho18:06:35

woops, replaced with 20190618.1025

dpsutton19:06:59

@kingcode make sure you have the latest nrepl-refactor. Probably remove it while you get everything working again

kingcode19:06:07

The issue had to do with figwheel-sidecar using an old tools.nrepl dep - I used an other version which fixed the issue.

dpsutton19:06:31

ah. 0.5.18 should be the ticket then

kingcode19:06:51

@dpsutton I have to manually jack-in clj now, but it is working together with the cljs. It seems the key bindings all changed - jack-in, + refactor bidings don’t work anymore…

dpsutton19:06:11

what do you mean manually jack in?

kingcode19:06:49

cider-jackin-clj and -cljs, they used to both start with C-c M-J. No longer works that way…

kingcode19:06:13

C-c M-n no longer works (used to swith to ns),

dpsutton19:06:24

that brings up the cider-ns-map with several options now

kingcode19:06:32

So to resume, when I C-c M-J, only the cljs repl client comes up. So, I start C-c M-j separately, instantiate my server, and reload the web page and it now works as before - but what a headache…EDIT: duh! somehow I was out of clj-refactor mode, everything is good now. Actually I prefer starting the clj repl manually, which I do first - in the old version C-c M-J always produces the figwheel repl first and a js error due to server not being up. Thanks!

kingcode19:06:00

OK thx. Your help is very appreciated! Will check up on all this and see if I can smooth things up 🙂

dpsutton19:06:36

i defined a bunch of connections like that. you could make your own startup function

kingcode19:06:12

Sounds good, will look into that. Thank you!

mhcat19:06:23

Does this ring any bells for anyone?

cljr--get-error-value: Error in nrepl-refactor: java.lang.AssertionError: Assert failed: (instance? java.io.PushbackReader rdr)

mhcat19:06:25

Full trace

benedek20:06:51

what is your version @j0ni?

mhcat20:06:23

of everything? I just updated everything that needed an update from melpa

benedek20:06:26

M-x cljr-version

mhcat20:06:48

clj-refactor 2.5.0-SNAPSHOT (package: 20190618.716), refactor-nrepl 2.5.0-SNAPSHOT

benedek20:06:16

that is the new snapshot @bozhidar just released

benedek20:06:29

maybe the release went wrong?!

benedek20:06:38

try to downgrade to stable

benedek20:06:46

as a workaround

benedek20:06:10

an issue on github would be appreciated

mhcat20:06:32

sure, will do - thanks!

zlrth20:06:24

cider-jack-in is getting an "old" version of my $path. cider-jack-in's output doesn't have /Library/Java... my path is constructed in my .profile. this behavior survives reboot.

zlrth20:06:45

and i have set my JAVA_CMD="/Library/.....java", which a terminal picks up, but same behavior for cider-jack-in. and lein repl from the terminal works.

dpsutton20:06:08

you don't need to use the package but this is your issue (i think). Emacs path != shell path

dpsutton20:06:23

you can test by starting emacs from a terminal and seeing it work

zlrth20:06:40

thanks. i had no idea

zlrth20:06:01

this is a new problem for me, since my work is on java 8, but there's a cool project that uses java 12. by the time i switched back to java 8 to build prod, oracle no longer has jdk8 publicly. so i went to openjdk. and now here i am. anyway thanks let me take a look

zlrth20:06:03

indeed (getenv "PATH") is missing /library/java/etc! thanks dpsutton!

parens 4
zlrth20:06:13

i never thought to check that!

Ian Fernandez21:06:17

guys, I'm having this problem with cider:

ERROR: Unhandled REPL handler exception processing message {:op midje-test-stacktrace, :ns user.query-test, :index 0, :print-fn clojure.lang/println, :session 972a0590-f8b7-4349-ae22-b541d7c381a1, :id 24}