cursive

Issues at: https://git.io/cursive-issues
Empperi 2020-09-14T05:36:06.086100Z

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.

cfleming 2020-09-14T10:37:15.086700Z

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:cursive@cursive-ide.com|cursive@cursive-ide.com>?

cfleming 2020-09-14T10:41:20.086900Z

@niklas.collin ^^

Empperi 2020-09-14T11:08:19.087100Z

I'll try that

Empperi 2020-09-14T05:37:09.086600Z

IntelliJ Ultimate 2020.2, Cursive 1.9.4-eap3-2020.2

stijn 2020-09-14T18:50:40.089400Z

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.

cfleming 2020-09-15T10:16:56.108900Z

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

cfleming 2020-09-15T10:18:32.109500Z

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

stijn 2020-09-15T10:28:38.111500Z

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

cfleming 2020-09-15T10:29:38.111900Z

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

stijn 2020-09-15T10:29:49.112100Z

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

stijn 2020-09-15T10:29:58.112500Z

that's right

stijn 2020-09-15T10:31:10.112700Z

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

cfleming 2020-09-15T10:32:21.113300Z

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

cfleming 2020-09-15T10:32:55.113500Z

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

stijn 2020-09-15T10:33:48.113700Z

I didn't try that, let me see

cfleming 2020-09-15T10:34:57.113900Z

For remote debugging, see: https://groups.google.com/g/cursive/c/iTri7vvXViA/m/w_HXi5mlDAAJ

cfleming 2020-09-15T10:35:12.114100Z

I should still document that 😕

cfleming 2020-09-15T10:36:25.114300Z

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

stijn 2020-09-15T10:37:05.114500Z

OK, the nrepl config works!

stijn 2020-09-15T10:38:24.114700Z

just adding

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

cfleming 2020-09-15T10:38:36.114900Z

Great!

vlaaad 2020-09-15T10:43:12.115100Z

Yes, reveal has nrepl middleware 🙂

cfleming 2020-09-15T10:43:36.115300Z

Sorry vlaaad, I pinged you prematurely there 🙂

vlaaad 2020-09-15T10:43:46.115500Z

np 🙂

vlaaad 2020-09-15T10:44:42.115700Z

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

cfleming 2020-09-15T10:45:56.115900Z

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

cfleming 2020-09-15T10:46:08.116100Z

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

stijn 2020-09-15T15:11:30.124800Z

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

🦜 1
2020-09-14T22:50:58.089700Z

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