This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2023-01-27
Channels
- # announcements (4)
- # asami (6)
- # aws-lambda (1)
- # babashka (38)
- # babashka-sci-dev (20)
- # beginners (87)
- # calva (67)
- # cider (19)
- # clerk (7)
- # clojure (102)
- # clojure-europe (52)
- # clojure-filipino (1)
- # clojure-hungary (4)
- # clojure-nl (1)
- # clojure-norway (6)
- # clojure-sweden (3)
- # clojure-uk (1)
- # cursive (13)
- # data-science (7)
- # datomic (8)
- # deps-new (1)
- # emacs (3)
- # fulcro (16)
- # graphql (3)
- # humbleui (3)
- # kaocha (3)
- # leiningen (3)
- # malli (3)
- # off-topic (14)
- # pathom (34)
- # polylith (4)
- # rdf (12)
- # reitit (3)
- # releases (1)
- # remote-jobs (7)
- # rum (2)
- # sci (22)
- # shadow-cljs (115)
- # tools-deps (26)
- # tree-sitter (29)
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...

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.
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.
Hello, I just started receiving this error message:
Iâve tried to restart VS code several time, looked for cache files (didnât find any)
Following
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
let me try that. fwiw, I downgraded to v2.0.324 and that works without any errors
output:
WARNING: Specified aliases are undeclared and are not being used: [:dev]
test:src:/Users/kkamdar/.m2/repository/org/clojure/clojure/1.11.1/clojure-1.11.1.jar:/Users/kkamdar/.m2/repository/org/clojure/core.specs.alpha/0.2.62/core.specs.alpha-0.2.62.jar:/Users/kkamdar/.m2/repository/org/clojure/spec.alpha/0.3.218/spec.alpha-0.3.218.jar
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?
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?
let me look there
:source-aliases
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.
đ 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?
That project had a empty deps.edn file in it. Let me remove it from the workspace and try again
I'll have to check my version; I see a very similar error though
That worked.
Ah, so the difference now is that LSP is checking every project in the workspace now I think.
@U04V70XH6 Iâm seeing another weird problem pop up all of a sudden. The Organize Imports
has stopped working. I see the below error:
Iâm going to try an older version
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?
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
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?
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
I'm not able to produce this error at the moment
What about the missing LSP commands, @U04HKE0BTC5?
Calva v2.0.328 is out, rolling back v2.0.327 which broke some things around clojure-lsp functionality. Please see https://github.com/BetterThanTomorrow/calva/issues/2041
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.

Fixes have arrived: https://github.com/BetterThanTomorrow/calva/pull/2046 Sorry for the delay - been working from a plane đ

Hopefully this addresses everything, let me know if I missed anything
Here is a link to a vsix build which contains the fixes: https://output.circle-artifacts.com/output/job/47e7881f-c01b-4dac-81cf-f91b86a486b5/artifacts/0/tmp/artifacts/calva-2.0.329-pull-2046-13d539fc.vsix
The project folder drop-down menu is a huge improvement -- thank you! (in our 160 deps.edn
monorepo)

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 https://github.com/BetterThanTomorrow/calva/issues/2041