Fork me on GitHub
#calva
<
2021-09-14
>
Hukka12:09:10

Couldn't find an explicit mention, but I guess calva does not support multiple different projects in the same workspace? For example frontend project with a shadow repl, and a different backend project with a deps.edn repl, running simultaneously?

pez12:09:07

We currently do not support that. You’ll need to run each in separate VS Code windows. There is some info about it here: https://calva.io/workspace-layouts/

pez12:09:26

If you make each window a separate VS Code Workspace you can use the Peacock extension to easily see which one is backend/frontend.

Hukka12:09:14

Heh, ok. I had thought that the workspace layouts refers to how the screen is chopped to different parts 🙂

Hukka12:09:35

Two windows works fine, now that I know it. I need more screens, perhaps…

pez13:09:52

We all need more screens!

pez13:09:26

Maybe we should rename that page. Workspace Setups maybe?

Hukka15:09:39

Would "multiproject repos" or "multiproject workspaces" be ok? I know that the page also mentions the basic case of one repo, one project, one workspace, but I'd assume that nobody would go looking for docs in such situation

pez15:09:23

Good point!

Max13:09:25

Have y’all ever looked into adding “rename file/rename dir” actions in calva/clojure-lsp before? I was going to file an issue, but I figured I’d ask here first in case there was some important reason why it hasn’t already been built.

ericdallo13:09:01

rename file already works but only renaming the namespace form which will trigger the file change later

ericdallo13:09:24

but yeah, those are features recently introduced into the LSP protocol, so feel free to open an issue about that on clojure-lsp

Max13:09:34

Oh nice, I didn’t know that had already been built

Max13:09:47

When is the existing file rename triggered? I’m not seeing that happen

ericdallo13:09:32

if you hover over (ns foo.|bar) where | is your cursor, and call the rename refactor (F2 I think on Calva), it should work

ericdallo13:09:46

otherwise, you don't have your source-paths properly configured for your project.

Max13:09:58

aha! Thanks!

vncz16:09:56

I am trying to evaluate a form but for some reason nothing happens and the Calva Output is empty; anybody has any advice where to start looking?

vncz16:09:47

It seems like the connection never completes and I never see the prompt

pez16:09:23

Strange. you should at least see this in the output window when you Jack-in:

; Jacking in...
; Starting Jack-in Terminal: clojure -Sdeps '{:deps {nrepl/nrepl {:mvn/version,"0.8.3"},cider/cider-nrepl {:mvn/version,"0.26.0"}}}'  -m nrepl.cmdline --middleware "[cider.nrepl/cider-middleware]"
The first message should appear immediately and the second when you have selected the project type…

pez16:09:08

Try Jacking in again and see if it happens something different this time. Is all I can think of right now…

vncz16:09:51

This is weird, it seems like it worked now

pez18:09:13

I can't form a single theory around why it happened.

vncz18:09:16

¯\(ツ)

pez19:09:52

Please let us know if it happens again. Until then, let’s celebrate that things work for you again! 🎉

vncz23:09:32

It just happened again. I’m jacking in and it hangs

pez05:09:25

Can you file an issue from VSCode? I think it's in the help menu. That will attach some info about your system that might give us a clue what's going on.

vncz13:09:54

I am going to try to reproduce this again but it seems like it might happen when I am on a specific file. If I make sure that no file is opened in VSCode it works first shot @U0ETXRFEW

pez13:09:34

Intriguing!

vncz13:09:49

Actually no the issue persists

vncz13:09:13

VS Code version: Code 1.60.1 (83bd43bc519d15e50c4272c6cf5c1479df196a4d, 2021-09-10T17:09:14.403Z)
OS version: Darwin x64 20.6.0
Restricted Mode: No

<details>
<summary>System Info</summary>

|Item|Value|
|---|---|
|CPUs|Intel(R) Core(TM) i7-1068NG7 CPU @ 2.30GHz (8 x 2300)|
|GPU Status|2d_canvas: enabled<br>gpu_compositing: enabled<br>metal: disabled_off<br>multiple_raster_threads: enabled_on<br>oop_rasterization: enabled<br>opengl: enabled_on<br>rasterization: enabled<br>skia_renderer: disabled_off_ok<br>video_decode: enabled<br>webgl: enabled<br>webgl2: enabled|
|Load (avg)|3, 2, 2|
|Memory (System)|32.00GB (4.03GB free)|
|Process Argv|--crash-reporter-id 2e9af703-4d89-4e79-9bfa-cbaaef346bf2|
|Screen Reader|no|
|VM|0%|
</details><details><summary>Extensions (7)</summary>

Extension|Author (truncated)|Version
---|---|---
calva|bet|2.0.211
remotehub|Git|0.14.0
python|ms-|2021.9.1230869389
vscode-pylance|ms-|2021.9.1
jupyter|ms-|2021.8.2041215044
jupyter-keymap|ms-|1.0.0
vscode-gitweblinks|red|2.5.2


</details><details>
<summary>A/B Experiments</summary>

vsliv368:30146709 vsreu685:30147344 python383:30185418 pythonvspyt678:30270856 pythonvspyt602:30300191 vspor879:30202332 vspor708:30202333 vspor363:30204092 pythonvspyt639:30300192 pythontb:30283811 pythonvspyt551cf:30345471 pythonptprofiler:30281270 vshan820:30294714 vstes263cf:30335440 pythondataviewer:30285071 pythonvsuse255:30340121 vscod805cf:30301675 pythonvspyt200:30340761 vscextlang:30333561 binariesv615:30325510 vsccppwt:30364497 pythonvssor306:30344512 bridge0708:30335490 pygetstartedc2:30360494 bridge0723:30353136 pythonrunftest32:30365366 pythonf5test824:30361777 javagetstartedt:30364666 pythonvspyt187:30365361 pydsgsc2:30361791 vssid140cf:30363604 vssur157:30365996
</details>

<!-- generated by issue reporter -->

vncz13:09:35

@U0ETXRFEW ^ Not too sure how much this is going to help you

vncz13:09:09

Might that be because I’m on the JVM 16?

vncz13:09:57

Actually closing VSCode completely and reopening it fixed the issue again

vncz13:09:18

I might say something’s up when you leave the REPL opened for long time, maybe trying to connect to a port that’s busy because of something else

pez13:09:25

Very strange. Please post it as an issue, including the issue reporter thing above. This might take us a while to figure out and the visibility of an issue can help us get input from others.

pez13:09:25

I doubt a bit that it is java related, because the repl seems to start nicely. It is Calva that seems to get stuck on something. (From what I read from the screenshots.)

vncz14:09:04

That is also what I was thinking now that I’ve tried again. What’s interesting is that the problem seems to go away if I completely close VSCode and start over.

vncz14:09:21

Are there any logs I can check out? Maybe I can find some infos there

pez14:09:12

The developer console might tell something. (Help menu, I think)

vncz15:09:56

All right, I’ll try to take a look into later and see what happens! Thanks

vncz16:09:26

All empty here 😞

vncz14:09:45

Not too sure if this helps @U0ETXRFEW but basically when this weird error happens it seems like even if I try to connect manually the socket is closed.

Rohit Thadani22:09:25

Hi i am trying to get the debugger running in calva where i need to run lein repl on the command line because of my environment. I tried following the instructions and set up a profiles.clj like so

{:user {:plugins             [ [cider/cider-nrepl "0.22.4"] ]

        :dependencies        [[nrepl/nrepl "0.8.3"]]

        :repl-options        {:nrepl-middleware ["cider.nrepl/cider-middleware"] } }}
However if i run lein repl now i see this error that i cant understand
[WARNING] No nREPL middleware descriptor in metadata of #'cider.nrepl/cider-middleware, see nrepl.middleware/set-descriptor!
Syntax error (IllegalArgumentException) compiling at (/tmp/form-init11253749944262238488.clj:1:74).
Key must be integer
Please help

pez08:09:44

I can’t immediately see why that would happen, but maybe you can instead try copying Calva’s Jack-in command line (there’s a command for that) and use that one to start the REPL? You might need a slightly different command line, but if the copied one works without errors, you can probably adapt it to your needs.

Rohit Thadani18:09:59

understood will try that thanks

Rohit Thadani18:09:50

that works thanks

❤️ 2
Rohit Thadani20:09:09

just in case if anyone tries to search for this it does have a solution based on the cider docs when i had the profile set like this

{:repl {:plugins             [[cider/cider-nrepl "0.26.0"]]
        :dependencies        [[nrepl/nrepl "0.8.3"]]}}
it works like it says on the calva docs

Rohit Thadani20:09:35

I can now set break points calva is awesome thank you

Alexander Kouznetsov23:09:19

Is there a command that allows to open a namespace file by pasting a full namespace name? The issue mostly related to underscores and dashes conversion. When I use go to file operation in vscode, I need to remove all the dashes, otherwise it wouldn’t find the file.

pez08:09:39

I don’t think I’ve seen such a command. Calva doesn’t have it, at least.