Fork me on GitHub
#cursive
<
2020-09-14
>
Empperi05:09:06

Duuno if this has been reported already but stub generation doesn't work for me anymore:

Syntax error (FileNotFoundException) compiling at (C:\Users\Niklas\AppData\Local\Temp\create-stub14382613955835016522.clj:1:1).
Could not locate cursive/stubs/metadata/clojure__init.class, cursive/stubs/metadata/clojure.clj or cursive/stubs/metadata/clojure.cljc on classpath.

cfleming10:09:15

Can you try this please? Help-&gt;Diagnostic Tools-&gt;Debug Log Settings…, add #cursive.stubs there, then reproduce the problem and send me the logs to <mailto:[email protected]|[email protected]>?

Empperi11:09:19

I'll try that

Empperi05:09:09

IntelliJ Ultimate 2020.2, Cursive 1.9.4-eap3-2020.2

stijn18:09:40

Is there a way to make alternative repls like REBL or Reveal work with the nREPL option from Cursive > run configurations? I can make it work with clojure.main from the run config, and also by starting the REPL from the shell and then connecting to it from Cursive. But both of these have some drawbacks for running tests / debugging.

thumbnail22:09:58

I use nrebl middleware, which works good most of the time; https://github.com/RickMoynihan/nrebl.middleware

stijn06:09:14

Could you share your run configuration settings in Cursive? I can't make it work with starting the repl from inside IntelliJ

cfleming10:09:56

@U0539NJF7 I haven’t tried this, but I’ll have a go at setting it up in the next day or so.

cfleming10:09:32

The author of reveal is a Cursive user, so I imagine it can be made to work well there (paging @U47G49KHQ)

stijn10:09:38

Ah I didn't know that. Here's some more documentation on what I tried: Solution 1 (works) add alias

:reveal-nrepl {:extra-deps {vlaaad/reveal {:mvn/version "0.1.0-ea30"}
                            nrepl/nrepl   {:mvn/version "0.7.0"}}
               :main-opts  ["-m" "nrepl.cmdline" "--middleware" "[vlaaad.reveal.nrepl/middleware]"]}
and start from cli
clj -A:reveal-nrepl
and connect Cursive remote nREPL to that process Solution 2 (works) define alias
:reveal {:extra-deps {vlaaad/reveal {:mvn/version "0.1.0-ea30"}}
         :main-opts ["-m" "vlaaad.reveal" "repl"]}
and from Cursive, create run configuration as follows (see screenshot) • clojure.main • add reveal to aliases

cfleming10:09:38

Ok, but you’d like to start the process using a local REPL, install the middleware and be able to connect to it?

stijn10:09:49

Now what doesn't work: • nREPL • add reveal-nrepl alias

stijn10:09:58

that's right

stijn10:09:10

because, the clojure.main repl doesn't have run tests integration, and the remote repl doesn't allow debugging

cfleming10:09:21

Have you tried setting the middleware using .nrepl.edn? https://nrepl.org/nrepl/0.8/usage/server.html#server-configuration

cfleming10:09:55

Actually, you can debug the remote REPL. One sec…

stijn10:09:48

I didn't try that, let me see

cfleming10:09:12

I should still document that 😕

cfleming10:09:25

I’m off to bed now, but let me know if it works.

stijn10:09:05

OK, the nrepl config works!

stijn10:09:24

just adding

:middleware   [vlaaad.reveal.nrepl/middleware]
to the config and ensuring to add an alias that includes the dep works thanks!

vlaaad10:09:12

Yes, reveal has nrepl middleware 🙂

cfleming10:09:36

Sorry vlaaad, I pinged you prematurely there 🙂

vlaaad10:09:42

I never had a need for test integration provided by nrepl, tests can be run from the repl ¯\(ツ)

cfleming10:09:56

I think stijn means that Cursive’s test integration requires nREPL and doesn’t work over a socket/clojure.main connection.

cfleming10:09:08

It could work over a socket connection but I haven’t fixed that yet.

stijn15:09:30

yeah, that's what I meant. Anyway, Reveal looks awesome @U47G49KHQ 🙂

parrot 3