Fork me on GitHub

If you have a Polylith monorepo with over 100 components (as we do), that change makes for a really unwieldy menu since I now get double the number of lines in it (and extra vertical space too?) so that menu is somewhere north of 300 lines long now (showing 160 deps.edn files and their full paths).


It would be great if Calva either remembered the last project you connected to (it's always the workspace root for us) or defaulted to the workspace root -- instead of whatever random file in the repo you happen to have open...

plus_one 2

Another option would be to always put the current path at the top of the menu and default to that -- since at least then the default would work for almost everyone and I'd only have to move the cursor down one row to select the workspace root.


Is this the repl connect menu with project roots you are referring to?


We can also make that extra line searchable, so you would type ”root” and select it quickly that way. Though, I think that in a Polylith project that extra line does not otherwise add all that much value. We should consider skipping it at some threshold, or something.


Yes, whenever I connect to a REPL: I get the folder menu, then the project type menu (which at least it remembers from the previous connection), then the host:port menu. It's a bit painful overall but this latest change is a nightmare for me 😞


Sorry about that, @U04V70XH6! Until we fix it you can navigate to the top of the menu with a keystroke. cmd+home works on Mac. Not sure what it could be on Windows.


Ah, ctrl+home would probably work -- I hadn't thought of trying that in a drop-down menu...


Yup, confirmed. That's much better.


It would be nice if there was a single command to just connect to the workspace-root-deps-nrepl using the host:port already set (in the .nrepl-port file) with no interaction needed. Those menus are fine for a first connection but a pain for repeated later connections.


Do repl connect sequences not allow this already? (I don’t really use them.) If not, maybe a solution could be something added to the connect sequence functionality to allow this.


@U9A1RLFNV No, they appear as items in the second of those three menus -- I use them already for setting up QA and production REPL connections -- but you still have to go through the first project/folder menu to get to the "repl type" menu in which they appear and then manually select one: so you only skip the third "menu" (dialog) of host:port.

👍 2
Kiyanosh Kamdar18:01:10

Hello, I just started receiving this error message:

Kiyanosh Kamdar18:01:36

I’ve tried to restart VS code several time, looked for cache files (didn’t find any)

Kiyanosh Kamdar19:01:52

is there a way to revert back to a previous version? It appears I’m on latest v2.0.327


@U03EEEB90DV If you run that command from the workspace root, what output do you get? /usr/local/bin/clojure -A:test:dev -Spath

Kiyanosh Kamdar19:01:43

let me try that. fwiw, I downgraded to v2.0.324 and that works without any errors

Kiyanosh Kamdar19:01:25


WARNING: Specified aliases are undeclared and are not being used: [:dev]


OK, so it's not finding the :dev alias -- which is probably why that message appears.


Either add :dev as an alias in the project or remove it from the aliases when you jack-in I guess?

Kiyanosh Kamdar19:01:00

hmmm I’m not sure where that alias is coming from. The error message I post above comes when I startup VS code and don’t do anything else.


Perhaps in your .lsp/config.edn file?

Kiyanosh Kamdar19:01:37

let me look there



Kiyanosh Kamdar19:01:43

That file doesn’t have :source-aliases that I could find


Try with the previous version of Calva. In the extensions pane, you can bring up a menu on the Calva entry, and select to install another version.

Kiyanosh Kamdar19:01:48

👍 v2.0.324 loaded fine


The error doesn’t look like it would come from the changes, but they were almost all about clojure-lsp…


And, just to check @U03EEEB90DV, /Users/kkamdar/repos/docs-ci-master/deps.edn exists and is the valid deps.edn file for this project, where you ran the clojure command above?


I was going to ask the same as @U04V70XH6, and also if /Users/kkamdar/repos/docs-ci-master/ is the project root?


@USDPTD3FY, are you experiencing similar problems with 2.0.237?

Kiyanosh Kamdar20:01:31

That project had a empty deps.edn file in it. Let me remove it from the workspace and try again

Daniel Craig20:01:21

I'll have to check my version; I see a very similar error though


Ah, so the difference now is that LSP is checking every project in the workspace now I think.

Kiyanosh Kamdar20:01:10

@U04V70XH6 I’m seeing another weird problem pop up all of a sudden. The Organize Imports has stopped working. I see the below error:

Kiyanosh Kamdar20:01:19

I’m going to try an older version

Kiyanosh Kamdar20:01:30

older version works!


Can you describe the workspace layout you have a bit, @U03EEEB90DV ?


@U04HKE0BTC5 , do you have an idea what could be going on?

Kiyanosh Kamdar21:01:55

Can I send you a picture? A workspace with five projects. Only two are core clojure project, the others are k8s helm charts and other things


At a glance not sure what's happening. Must be some side-effect from the changes. If this is too wide-spread we can rollback maybe? How easy is this to reproduce?


I didn't run into this in my testing, having a reproducible project structure would be really helpful

Kiyanosh Kamdar21:01:31

this is what it looks like:


@U0ETXRFEW the default setting for lsp autostart will try start an lsp server in all workspace roots regardless of whether they are valid clojure projects or not. (I.e not the on file open behavior). So this is probably related to starting an lsp server in a non-clojure project. @U03EEEB90DV does the lsp in the clojure project workspace folders work?

Kiyanosh Kamdar21:01:01

Yes, they seem to be working


Ok, then this is probably not a big issue I think. Just need to prevent starting the lsp in non-clojure workspaces to prevent the vscode error notification

Daniel Craig21:01:29

I'm not able to produce this error at the moment


What about the missing LSP commands, @U04HKE0BTC5?


Rolling back v2.0.327 now. 328 will be 326 with a new name.


Calva v2.0.328 is out, rolling back v2.0.327 which broke some things around clojure-lsp functionality. Please see


Will take a look at this over the weekend

❤️ 4

Cool. I've not rolled back our main development branch this time, @U04HKE0BTC5. If it seems to get tricky fixing the issues, let me know and we can rollback dev. But if it is not so tricky, we can allow dev to be blocked for new releases while fixing. I'll try to make myself available, should you need my help with something.


And, to be clear, now I know I can use ctrl+home to jump to the top of the connect folder/project menu, the "very large" menu is less of a concern -- and my preferred solution there would be for Calva to perhaps put the "current" project folder (identified by the current logic based on what file is open) at the very top of the list, followed by all the auto-discovered folders (i.e., the current list). That would allow folks to just hit enter to retain the current behavior -- select the project folder most likely associated with the current open file -- with the workspace root (if different) on the second line, making it much easier/more obvious to navigate to.


(the real solution here is to provide a programmatic API so folks can more easily avoid the three menus/dialogs altogether and just bind a key to a Joyride script to auto-select the workspace root, the project type, and the .nrepl-port value and not require human confirmation three times! 🙂 )


I think we have an issue for the real solution. Restoring the menu is a temporary measure. If we can sort it like you suggest without much issue, we might do that instead.


I know our project is somewhat of an outlier:

(/var/www/worldsingles)-(!2016)-> find . -name deps.edn | wc
    178     178    6084
(because with Polylith, every "base", "component", and "project" has deps.edn as well as the top-level -- workspace -- deps.edn)


@U04V70XH6 I think your suggestion with sorting the pre-selected item to the top is brilliant. It will support your gargantuan Polylith without sacrificing Ux for more common project sizes. It also seems easy to implement on top of what we have.


Quick update: Locally I have PoC fix for the missing clean-ns command when running organize-imports (and other related issues) and I have resolved the issue of the lsp being starting in non-clojure projects. Need to pause for now - will continue this evening.

metal 2

Fixes have arrived: Sorry for the delay - been working from a plane 😁

gratitude 2

Hopefully this addresses everything, let me know if I missed anything


Installed. Will let you know how it goes!

🙏 4

The project folder drop-down menu is a huge improvement -- thank you! (in our 160 deps.edn monorepo)

clojure-spin 4

Rolling back v2.0.327 now. 328 will be 326 with a new name.


Calva v2.0.328 is out, rolling back v2.0.327 which broke some things around clojure-lsp functionality. Please see