Fork me on GitHub
#calva
<
2023-03-16
>
Pratik05:03:34

Seems like “Connect to a running REPL in your project” functionality is broken, it’s not allowing me to define port that I want to connect the REPL on

seancorfield05:03:24

Which version of Calva?

seancorfield05:03:13

I notice recent versions of Calva skip the port dialog if it can determine it from the .nrepl-port file (which has always been correct for me).

Pratik05:03:28

I am on v2.0.338

Pratik05:03:47

I haven’t noticed it, maybe I was in some old version when I tried it last and I was getting the port dialog. Let me see if it’s connecting to the correct port

Pratik05:03:42

hmm, for me port in .nrepl-port is not correct because I am trying to port-forward it from k8s pods. Updating .nrepl-port seems to be working fine, thanks

Pratik05:03:47

but how does .nrepl-port work? where does it takes the port from? should we still show the port dialog with some default port value selected?

seancorfield05:03:56

That file is created locally when you start an nrepl server (locally).

pez05:03:42

There is a Calva setting for prompting even though there is a port.

pez05:03:29

You can also customize the port file path using a connect sequence and have your repl start script write the port to that file.

pez06:03:00

If you delete the .nrepl-port file and it isn’t recreated somehow you should still get the prompt without changing settings.

Pratik06:03:55

wow, that’s a lot of options 🙂 thanks @U0ETXRFEW I’ll try that setting to prompting

k3nj1g06:03:38

Calva since v2.0.337 doesn't kill java process on Stopping/killing the Jacked-in REPL process . Is it a known issue?

pez07:03:37

It is mentioned here: https://github.com/BetterThanTomorrow/calva/issues/2113 Might be still an issue.

k3nj1g07:03:00

I have checked it on a minimal project nrepl: 1.0.0 cider-nrepl: 0.28.5 cider/piggieback: 0.5.3 clojure-lsp version configured: latest Calva version used: v2.0.338 Run Jack-in process via deps.end project-type. ps -a show java process. Then ctrl + c in Calva terminal -> ps -a java process still there.

pez07:03:17

Are you on Linux? Which Calva version are you using?

k3nj1g07:03:33

VS Code running on WSL 2 : Ubuntu 18.04. Calva version used: v2.0.338

k3nj1g07:03:28

ctrl + c worked on v2.0.336

pez07:03:34

Thanks! Please file an issue.

pez07:03:18

So far I think this might be a Linux issue. Will test on my fedora box later today.

k3nj1g08:03:56

Ok, thanks

Isac15:03:06

I have the same issue and I use macOs.

macOS: Venture 13.2.1
VsCode: 1.76.2
Calva: v2.0.338

🙏 2
pez15:03:13

@U0AJQJCQ1 can you repro this issue too?

pez22:03:48

Should be fixed in 339, please let me know if it is or if it isn't. I couldn't reproduce, but I am pretty sure I found the cause of the problem.

❤️ 2
az00:03:57

@U0ETXRFEW - I did notice a few times, it wasn't stable though. But I did need to manually kill a zombie java process. I haven't been having it since I updated java to opensdk 19 for the apple chip. Probably unrelated though.

az00:03:39

@U0ETXRFEW - Thank you, confirmed that 339 fixed it. I was able to reproduce on 338 just now and it's working great in 339.

Isac00:03:19

Apparently was fixed. 🙏

tlonist07:03:07

is there a way to automatically update namespace upon updating its enclosing package name? for example, if I change the package name from temp to data , the namespace (ns temp.core) should be updated to (ns data.core).

pez07:03:12

You can try to refactor the namespace symbol. Default keybinding is F2 on mac.

tlonist08:03:38

thanks. can you tell me the exact name for the command? shft+cmd+p doesn't show anything for refactor namespace symbol or anything close to that.

pez09:03:49

It’s a general rename refactor. Afk. But look for rename maybe?

2
cjmurphy09:03:19

'Rename Symbol'. I got there through 'Keyboard Shortcuts', which you can get to through Settings (gear icon at bottom left).

2
tlonist09:03:20

@U0D5RN0S1 thanks, works great.

pez09:03:12

Indeed the Keyboard Shortcuts view is a great tool for searching for commands.

Thierry09:03:21

Anyone else using VSCode Insiders on Windows with Calva having their parinfer/auto alignment stop working randomly? I have to restart lsp to get it to work again.

Thierry09:03:21

Here is the error log spam

Thierry09:03:04

Followed by

Thierry09:03:40

This time it started responding again after a while. What I did was cut (ctrl+x) 4 lines of code and pasted it somewhere else in the code.

Tuomas-Matti Soikkeli09:03:00

I did have some issues with formatting/indents/prettyprint and changed the backend for from pprint to calva

Thierry09:03:19

Let me try that

Tuomas-Matti Soikkeli09:03:37

pprint had some troubles formatting some macros, calva option have been working so far

pez09:03:46

Maybe something has changed in clojure-lsp. Try with a previous version.

Thierry09:03:13

will try that aswell @U0ETXRFEW

pez09:03:42

@UM1PCCLNN I don't think that is anything new really. pprint on the server runs in the process and has benefits such as being able to render lazy sequences, but can also fail pretty printing some stuff.

pez09:03:58

The parinfer extension is unmaintained I think. So it could have some problems with new vscode for sure. I don't see how those clojure-lsp problems could be related. And maybe they aren't, but doesn't look good anyway.

ericdallo12:03:20

A request being canceled is client(Vscode) cancelling it because is not relevant anymore, usually when you changed the code or did a new request for that, I can't see why is related to parinfer as well

Thierry13:03:56

parinfer is what makes the code line out and be on the right indent right?

Thierry13:03:25

Maybe something changed in the automatic outlining/indenting code?

Thierry13:03:51

I used to be able to just press TAB and all the bindings/expressions in the current Sexp would automatically line up

Thierry13:03:10

For some reason this either doesnt work like it did before, changed or is slower

Thierry13:03:34

I now need to line up my cursor to the opening paren and press tab

Thierry13:03:52

while before I could just do this inside the parens

Thierry13:03:14

for some reason the cursor jumps to the end of the file some times

Thierry13:03:20

after pressing tab

Thierry13:03:53

Here's an example

Thierry13:03:39

I have to explicitly move my cursor to just before the opening paren to be able to use TAB for auto indentation

Thierry13:03:06

This is with

Calva version used: v2.0.338
clojure-lsp version used: 2023.02.27-13.12.12
clj-kondo version used: 2023.02.17

pez14:03:47

Could be a result of a change between 336 -> 337. It's Calva doing that, not parinfer (well, could be that both do it, I am not a parinfer user so wouldn't know). I do not understand GIF language, so you are welcome to file an issue using before/after text examples and it might be clearer to me what is not working.

Thierry11:03:48

Calva had an update to 339 today? It seems solved already?

pez11:03:37

Yes. I could reproduce it.

🎉 2
💯 2
Thierry11:03:07

Thanks for the quick solve

🙏 2
pez22:03:45

Dear Calva friends: Some recent regressions fixed: https://github.com/BetterThanTomorrow/calva/releases/tag/v2.0.339 • Fix: https://github.com/BetterThanTomorrow/calva/issues/2116 • Fix: https://github.com/BetterThanTomorrow/calva/issues/2114 • Bump bundled deps.clj to v1.11.1.1257 Thanks for reporting! 🙏 ❤️ calva

👍 4
🙌 2