Fork me on GitHub

Is there any way to rename ns a.b to a.c.b ? I could rename a.b to a.c with M-x refactor-this + Rename but I couldn't do it for the above case. I think cursive currently cannot do it if it moves over directories. Is that correct?


That’s correct right now, but this will be possible soon.

❤️ 3
👍 3

I appreciate it so much! 👍 I'm looking forward to it. It would make it easier to refactor project structure.


Yes, no doubt!


I've been trying to get nrepl working inside wsl2 for a while now and I'm not having much luck, has anyone else being trying this? Specifically running intellij in windows and trying to connect the remote repl to an nrepl instance via shadow-cljs running within wsl2. All of my ports appear to be open, but for some reason nrepl refuses connections. Does it not accept any external connections by default or something? I can definitely connect to it within wsl2 and I can connect to other running parts of shadow-cljs.


what host are you using? localhost or the explicit IP address of the WSL2 instance?


I have no idea if that's relevant or not, but random things like that do trip me up sometimes with wsl2 interop


I also use windows+wsl2 for development. But, I just run intellij from wsl2 directly, using x410 as an x server on the windows side


I've tried both, as well as using ssh to do port forwarding, it's surprisingly opaque.


Hmm, does that end up working well? I'm a little concerned about whether that's going to cause odd quirks like file system slowdowns or keyboard shortcut issues?


clj -Sdeps '{:deps {nrepl {:mvn/version "0.8.3"}}}' -m nrepl.cmdline --connect --host host --port port
are you able to connect directly from powershell?


and it works well for me. I use intellij professionally for kotlin / javascript / clojure & do all of it directly in wsl2


I haven't had any issues related to file system slowdowns as long as your code is also in the wsl2 disk. the file system speed issues only exist when accessing files from windows instead of the local partition


no issues with keyboard shortcuts, but x410 does stick to the keyboard layout that you started it with. So if you switch between different windows keyboards (like I do with Russian & Chinese), they don't work directly in the intellij window.


only other annoyance is x410 connections are done over tcp, and those connections don't survive shut downs or sleep. So you have to close intellij before you turn off your computer


the windows team is supposed to be releasing a native version of handling gui apps from wsl2 this year. I'm hopeful those will fix those issues for me 🙂


but they're all pretty minor for my workflow


Hmm, that's pretty lucky. I'm assuming hibernating would also be an issue, which would be a problem for me. Sometimes leaving my code overnight and being able to just dive back in the morning is really helpful 😃...


I've been testing with:

lein repl :connect
Which I assume is similar? It certainly works within the wsl bash shell...


Trying it from powershell isn't great however


yeah, hibernating also has the same issues


in order to debug if it's a "windows thing" or "cursive/java thing", you'll probably need to be able to test it from powershell


The interesting thing is if I remove the entries in netsh portproxy then the response changes: with: netsh interface portproxy add v4tov4 listenport=8777 listenaddress= connectport=8777 connectaddress=

lein repl :connect
Connecting to nREPL at
SocketException Connection reset (:-1) (:-1) (:-1) (:-1) (:-1) (:-1)
        bencode.core/read-byte (core.clj:87)
        bencode.core/read-byte (core.clj:-1)
        bencode.core/read-token (core.clj:239)
        bencode.core/read-token (core.clj:237)
        bencode.core/read-bencode (core.clj:257)
        bencode.core/read-bencode (core.clj:254)
Bye for now!
lein repl :connect
Connecting to nREPL at
ConnectException Connection refused: connect (:-2) (:-1) (:-1) (:-1) (:-1) (:-1) (:-1) (:-1) (:-1)<init> (:-1)<init> (:-1)
        nrepl.core/connect (core.clj:178)
Bye for now!
So it's connecting to something?


try connecting to the actual IP address of the wsl2 virtual machine. you can get that by running ip addr in the wsl2 terminal & pulling the value for eth0


Nope, then you just get the connection refused, which makes sense as there's no open port on that IP address I think? Actually, I wonder if this is windows firewall being clever


Nope that's not it either


no more ideas. Sorry


Thanks for the help anyway 😃


Finally figured it out I think? Well sort of, I can connect to it via ssh if I use an alternative port via:

ssh -L 8778:localhost:8777 [email protected]
So I guess that's one way of doing it >_<...