Fork me on GitHub
#cursive
<
2021-06-08
>
Azzurite08:06:33

I installed clojure.tools on Windows through scoop, but I can't use it with Cursive because the output of the clj -Sdescribe command contains invalid escape sequences:

$ cmd-clj.exe -Sdescribe
{:version "1.10.3.855"
 :config-files ["C:\Users\***\scoop\modules\ClojureTools\deps.edn" "C:\Users\***\.clojure\deps.edn" "deps.edn"]
 :config-user "C:\Users\***\.clojure\deps.edn"
 :config-project "deps.edn"
 :install-dir "C:\Users\***\scoop\modules\ClojureTools"
 :config-dir "C:\Users\***\.clojure"
 :cache-dir "C:\Users\***\.clojure\.cpcache"
 :force False
 :repro False
 :main-aliases ""
 :repl-aliases ""
 :exec-aliases ""}
because C:\Users\... contains \U... (I know, switch to Linux...)

cfleming08:06:21

Hmm, that sounds like a deps bug really, since the output is supposed to be edn but isn’t readable. I’d be interested to hear if that’s something that might be fixed there - I’m not sure what Cursive could do about that.

Alex Miller (Clojure team)12:06:33

Yeah, it’s a bug

👍 2
Litewhat12:06:21

Hello! I have a problem with connecting to a remote REPL running on WSL from Cursive running on Windows. Every time it says "Connection refused". Do you have any idea why is it happening?

borkdude12:06:32

Can you connect using other tools, e.g. lein repl :connect ?

Litewhat14:06:54

@U04V15CAJ Unfortunately I cannot

borkdude14:06:35

Perhaps there is something here https://blog.michielborkent.nl/2020/07/26/remote-wsl2-clojure/ I have some powershell script that does stuff with ports in the Windows firewall, etc

borkdude14:06:22

Not sure if that is related though. Perhaps your REPL isn't listening on the wildcard address / public IP address of wsl(2)

Litewhat15:06:51

@U04V15CAJ I’ve check the script you had in the video. So I proxied only a port on which the repl is listening on WSL but still cannot connect to it

Litewhat15:06:39

> Not sure if that is related though. Perhaps your REPL isn’t listening on the wildcard address / public IP address of wsl(2) I’ll check that soon

Litewhat15:06:31

Looks like it’s not listening on wildcard address and I’m not sure how to do it :thinking_face:

borkdude16:06:31

what are you using, nREPL? how are you starting it?

Litewhat16:06:18

I’m using leiningen in WSL. I’m starting it with lein repl

borkdude16:06:53

See lein repl --help how to configure the host and port

Litewhat17:06:35

Checked that unfortunately when I’m setting host to 0.0.0.0 then the repl is running but I can see that it’s listening on 127.0.0.1. Also I have a postgres container which is listening on 0.0.0.0… Weird.

borkdude17:06:16

unfortunately.... it's working?

borkdude17:06:45

@UCMM72RT4 This works for me:

$ lein repl :start :host 0.0.0.0 :port 1337
nREPL server started on port 1337 on host 0.0.0.0 - 

Litewhat17:06:52

I’m sorry I wrote wrong

Litewhat17:06:09

Checking yours

Litewhat17:06:35

Good point @U04V15CAJ thank you! I used positional arguments which was wrong… So it says for me that nREPL is running on 0.0.0.0:5555. Now I can connect via lein repl :connect but I cannot with Cursive :thinking_face:

Litewhat17:06:35

@U04V15CAJ solved! I restarted and invalidated cache and now I’m super happy to connect from Cursive 🙂

favila12:06:19

Hello! I’m running into an issue again where I’m in a monorepo, multiple directories have the same bare name and are deps.edn projects, and because they have the same base dirname I can’t import them as modules at the same time. I’m wondering if any workaround for this problem as emerged in the past few months (I think) since I last encountered it?

favila12:06:27

To be more concrete: services/foo/deps.edn and modules/foo/deps.edn are different deps projects in the same intellij project

favila12:06:11

I can only have one of them as an intellj module at a time because the module name for both is “foo” and I don’t think I can control that.

salam20:06:52

have you tried manually adding and renaming those modules with the same (inferred) name in Project Structure / Project Settings / Modules ? you can add them one at a time and rename them following a naming convention (e.g., services-foo, modules-foo).

favila00:06:14

Cursive seems to control the module settings—the next ”import changes” will reset the names

salam04:06:26

you're right. we seem to have lost the ability to rename modules in this particular case where modules in different directories share the same name... 😞 Cursive threw 5 unhandled exceptions when i attempted to import and rename such modules...

Jeff Evans14:06:05

hopefully I explained this well, but adding a sub Lein project after the fact is somehow not working as well as the initial recursive import:

Jeff Evans17:06:06

left a comment… I think the problem may have been Maven fighting with Lein

kendall.buchanan15:06:13

Anyone running Cursive/IDEA on the Apple M1? Thoughts on how well it performs?

danieroux18:06:24

Snappy, blazing, joy inducing.

kendall.buchanan21:06:34

Fantastic. On a Macbook Pro or Air?

danieroux22:06:18

Both. I have a 16G Air as my personal machine and a Pro as work machine

onetom13:06:23

i've seen it on my colleague's machine. it's almost as good as my 8-core i9 27" iMac with 80GB RAM.