Fork me on GitHub
#vim
<
2018-10-23
>
Jan K15:10:31

Seems like vim-fireplace has some issues with Clojure 1.10.0-beta4 😞 Normal evaluation seems to work, but whenever I try to print a stack trace using :Eval (clojure.repl/pst) or just *e from vim-fireplace (after some exception happened), I always get a NullPointerException (always the same one below) instead of the actual exception/trace.

:Eval (clojure.repl/pst)
NullPointerException                                          
        user$eval7782.invokeStatic (:1)
        user$eval7782.invoke (:1)
        clojure.lang.Compiler.eval (Compiler.java:7172)
        clojure.lang.Compiler.eval (Compiler.java:7135)
        clojure.core/eval (core.clj:3206)
        clojure.core/eval (core.clj:3202)
        clojure.main/repl/read-eval-print--8898/fn--8901 (main.clj:309)
        clojure.main/repl/read-eval-print--8898 (main.clj:307)
        clojure.main/repl/fn--8907 (main.clj:332)
        clojure.main/repl (main.clj:332)
        clojure.main/repl (main.clj:233)
        clojure.tools.nrepl.middleware.interruptible-eval/evaluate/fn--811 (interruptible_eval.clj:87)

Jan K15:10:28

Can someone else try? If you get the same problem I'll enter an issue for vim-fireplace

juhoteperi15:10:00

@jkr.sw Did you try without cider-nrepl? Could be useful to check that find where the problem is Or maybe try with the new nrepl?

Jan K15:10:47

Isn't cider an emacs thing? I don't think I'm using that.

juhoteperi15:10:22

Cider-nrepl is generic nrepl extension which fireplace will use if it is available

Jan K15:10:30

I'll try with empty profiles.clj, although I don't have cider-nrepl or any other nrepl deps there

juhoteperi15:10:58

*e and pst work for me but (throw (ex-info "Foo" {})) just hangs for me with 1.10 but works in 1.9

Jan K15:10:31

That doesn't hang for me, but I get the *e problem even with minimal profiles.clj / project.edn

juhoteperi15:10:33

doing other things that throw exceptions, like (+ nil nil) also hang

juhoteperi15:10:47

And this is using nrepl 0.4.5

Jan K15:10:47

Looks like it's differently broken for each of us 🙂

Jan K15:10:10

how do I make "lein repl" use the new version? seems like it's using nREPL 0.2.13 for me

juhoteperi15:10:26

leiningen 2.8.1 should use 0.4.1

juhoteperi15:10:08

And probably you can add up-to-date dependency to the project.clj to update it

Jan K15:10:01

$ lein -version Leiningen 2.8.1 on Java 1.8.0_171 OpenJDK 64-Bit Server VM $ lein repl nREPL server started on port 41207 on host 127.0.0.1 - <nrepl://127.0.0.1:41207> REPL-y 0.3.7, nREPL 0.2.13

Jan K15:10:50

seems like using cider-nrepl 0.18.0 in profiles.clj fixed the problem for me - no hangs and correct stack traces, although now it's using nREPL 0.2.12 for some reason

Jan K15:10:42

thanks @juhoteperi 🙂

Jan K16:10:04

actually I'm getting hangs for some errors 😞 (not the ex-info one tho)

Jan K16:10:01

Well I'm back to Clojure 1.9.0 for now. Maybe other vim users can find a working configuration or investigate more.

devth16:10:10

i randomly get tons of hangs too. haven't figured out why. like 50% of cpr or cpp will result in an error. i just keep running it till it works, so it's very intermittent. i'm on lein 2.8.1 too

devth16:10:51

also seems way better on my other macbook with same version of lein working on the same project

Jan K16:10:25

@devth is that with the new Clojure 1.10 betas?

devth16:10:04

nope. 1.9.0

Jan K16:10:14

ah, that one works well for me. maybe try if it works better with or without cider-nrepl 0.18.0 in your profiles.clj

devth16:10:13

yeah i have been trying various versions of cider-nrepl

devth16:10:35

i've also been running this branch of vim-fireplace https://github.com/tpope/vim-fireplace/pull/323

devth16:10:01

hoping a new leiningen gets released with nrepl 0.4.x soon and maybe that'll fix it

dominicm17:10:34

Nrepl should always send a status done. This is part of the contract.

dominicm17:10:49

I think there's an open issue trying to find a case where it doesn't.