weird, when I try to start the repl (jack-in in a deps.edn project), I get the following:
⚡️ Starting the REPL ⚡️ using the below command line:
(cd /home/knotschi/rpm/rpm-system/etl; clojure -Sdeps '{:deps {nrepl/nrepl {:mvn/version,"0.3.0"},cider/cider-nrepl {:mvn/version,"0.1.0-SNAPSHOT"}}}' -M:dev -m nrepl.cmdline --middleware "[cider.nrepl/cider-middleware]")
Execution error (FileNotFoundException) at clojure.main/main (main.java:40).
Could not locate nrepl/cmdline__init.class, nrepl/cmdline.clj or nrepl/cmdline.cljc on classpath
this used to work a few weeks ago, not sure what has changed. anyone an idea what I am doing wrong? 🤷♂️If I remove this setting it is using again these old nrepl versions, so I need this setting in there
Thanks. With removed settings. What do you find in the Calva says output channel about these dependencies?
aha:
Calva is utilizing cider-nrepl and clojure-lsp to create this VS Code experience.
Latest available nREPL dependency versions known by Calva:
nrepl: 0.3.0
cider-nrepl: 0.1.0-SNAPSHOT
cider/piggieback: 0.2.3-SNAPSHOT
nREPL dependency versions:
nrepl: effective 0.3.0 (latest known by Calva)
cider-nrepl: effective 0.1.0-SNAPSHOT (latest known by Calva)
cider/piggieback: effective 0.2.3-SNAPSHOT (latest known by Calva)
clojure-lsp version configured: latestCalva version used: v2.0.540
clojure-lsp version used: 2025.08.25-14.21.46
clj-kondo version used: 2025.07.28So, that’s a bug for sure.
Super strange!
And super extra strange that it happens for you, but not for me. Cursor is of course a suspect, but still…
I can't say for sure if this is a bug I have only since newest version, or I always had it and solved it in the past by specifying these versions in my config
let me try with vsc
ah, yes, in vsc its better:
Calva is utilizing cider-nrepl and clojure-lsp to create this VS Code experience.
Latest available nREPL dependency versions known by Calva:
nrepl: 1.5.1
cider-nrepl: 0.58.0
cider/piggieback: 0.6.1It is probably not the same problem that you may have had in the past. The whole thing works quite differently now.
Will you have time to look at it, @arthurfucher? If it is as easy to repro as trying with Cursor, I guess we at least have something to start with…
I'll check with Cursor here
Cool. Let me know if I can help. I think that if we can conclude that it is a Cursor thing, we can create an issue and put the workaround there. We should create the issue anyway, of course.
Hmmm not able to reproduce in Cursor:
Calva is utilizing cider-nrepl and clojure-lsp to create this VS Code experience.
Latest available nREPL dependency versions known by Calva:
nrepl: 1.5.1
cider-nrepl: 0.58.0
cider/piggieback: 0.6.1@knotschi can you try to run this command inside Cursor terminal, please?
clj -X:deps find-versions :lib nrepl :n 1
clj -X:deps find-versions :lib nrepl :n 1
Execution error (NullPointerException) at java.util.regex.Matcher/getTextLength (Matcher.java:1808).
Cannot invoke "java.lang.CharSequence.length()" because "this.text" is nullWhat version of the Clojure CLI do you have in that terminal? And what version in VSC proper?
Clojure CLI version 1.11.1.1113
it might be this bug: https://clojure.atlassian.net/browse/TDEPS-245
Nice find!
clj -X:deps find-versions :lib nrepl/nrepl :n 1 works
clj -X:deps find-versions :lib nrepl/nrepl :n 1
{:mvn/version "0.3.0"}
{:mvn/version "0.3.1"}
{:mvn/version "0.4.0"}
{:mvn/version "0.4.1"}
{:mvn/version "0.4.2"}
{:mvn/version "0.4.3-SNAPSHOT"}
{:mvn/version "0.4.3"}
{:mvn/version "0.4.4-SNAPSHOT"}
{:mvn/version "0.4.4"}
{:mvn/version "0.4.5-SNAPSHOT"}
{:mvn/version "0.4.5"}
{:mvn/version "0.5.0-SNAPSHOT"}
{:mvn/version "0.5.0"}
{:mvn/version "0.5.1"}
{:mvn/version "0.5.2"}
{:mvn/version "0.5.3"}
{:mvn/version "0.6.0-SNAPSHOT"}
{:mvn/version "0.6.0"}
{:mvn/version "0.6.1-SNAPSHOT"}
{:mvn/version "0.7.0-alpha1"}
{:mvn/version "0.7.0-alpha2"}
{:mvn/version "0.7.0-alpha3"}
{:mvn/version "0.7.0-beta1"}
{:mvn/version "0.7.0-SNAPSHOT"}
{:mvn/version "0.7.0"}
{:mvn/version "0.8.0-alpha1"}
{:mvn/version "0.8.0-alpha2"}
{:mvn/version "0.8.0-alpha3"}
{:mvn/version "0.8.0-alpha4"}
{:mvn/version "0.8.0-alpha5"}
{:mvn/version "0.8.0-SNAPSHOT"}
{:mvn/version "0.8.0"}
{:mvn/version "0.8.1"}
{:mvn/version "0.8.2"}
{:mvn/version "0.8.3"}
{:mvn/version "0.9.0-beta1"}
{:mvn/version "0.9.0-beta2"}
{:mvn/version "0.9.0-beta3"}
{:mvn/version "0.9.0-beta4"}
{:mvn/version "0.9.0-beta5"}
{:mvn/version "0.9.0-SNAPSHOT"}
{:mvn/version "0.9.0"}
{:mvn/version "1.0.0-SNAPSHOT"}
{:mvn/version "1.0.0"}
{:mvn/version "1.1.0-alpha1"}
{:mvn/version "1.1.0"}
{:mvn/version "1.1.1"}
{:mvn/version "1.1.2"}
{:mvn/version "1.2.0-beta1"}
{:mvn/version "1.2.0-beta2"}
{:mvn/version "1.2.0"}
{:mvn/version "1.3.0-beta1"}
{:mvn/version "1.3.0-beta2"}
{:mvn/version "1.3.0-beta3"}
{:mvn/version "1.3.0-beta4"}
{:mvn/version "1.3.0"}
{:mvn/version "1.3.1"}
{:mvn/version "1.4.0"}
{:mvn/version "1.5.0-alpha1"}
{:mvn/version "1.5.0-alpha2"}
{:mvn/version "1.5.0-SNAPSHOT"}
{:mvn/version "1.5.0"}
{:mvn/version "1.5.0-loadfile-SNAPSHOT"}
{:mvn/version "1.5.1"}So that means we can fix it by qualifying the lib symbols?
looks like it
don't know why my VSC finds the newer versions though
should I update my clj and check if it works then, to double check if this clj version is the issue?
So, you reach the same version also in VSC?
The same version of clj, I mean.
if you mean in this terminal here, then yes
To my experience even the VS Code integrated terminal doesn’t tell the full truth about which version Calva will use. What do you get in an external terminal?
same
I think this terminal there is pretty much exactly the same as my external terminal. Its both using my zshell
I think maybe that Calva prints the clojure version to the console at start. You find the dev tools in the VS Code Help menu.
My current theory is that Calva in VS Code doesn’t find clojure and falls back on the deps.clj uberjar. While Cursor finds your old version.
[Extension Host] clojure version: 1.11.1.1113
in VSC
but in cursor I cannot find this in the devtools at allAh, so I can’t incorporate that in my current model of the universe, but let’s see what happens if I think about it some more. 😃
So VSC finds the version of clojure that is supposed to have the bug… Wow. Maybe Cursor devtools have some default filter?
If you have the time, @knotschi, please file an issue about this. There are probably more people running up against it and it’s good for them to find the issue and the workaround info.
I restarted both again. Still, same output in the VSC devtools, but nothing like it in cursor
It is very strange that you don’t see this logging in Cursor.
yeah, here also.. none of the logs are showing in the console at DevTools for Cursor. Just for VSC, as the image...
I now also tried with Cursor. No logging from Calva at all in the console…
I didn’t expect to experience the old “10% of the work to implement a feature, 90% to make it work in all browsers” with a VS Code extension, but here we are. 😃
btw, updating clj cli to 1.12.3.1577 did not help
but this works fine now:
clj -X:deps find-versions :lib nrepl :n 1
{:mvn/version "1.5.1"}I suspect that something in Cursor holds on to some version of the CLI. Could be that a re-install of Cursor fixes it. With VS Code I often get away with using Insiders instead of stable. Dunno if Cursor has something similar.
The VS Code installation can get corrupted. We’ve seen that happen a few times and we’re always very confused.
It’s frustrating that Cursor hides those loggings for us!
I don't have any nrepl dependency in my deps.edn file; running the same command in the terminal shows same error; jack-in on a leiningen project works fine
that nrepl version is ancient. i see version 0.4.2 was released in 2018
The versions look funny and ancient.
https://github.com/nrepl/nrepl/releases?page=2 I can’t find a release of that version here. It might go back to the days of the namespace switching from clojure.tools.nrepl
yes thats what I thought too 😄
Maybe you have pinned versions in Calva/VS Code settings?
let me check
We recently changed Calva around this, so it could well be a bug.
I am very confused. Somehow in my user settings I have this:
"calva.jackInDependencyVersions": {
"nrepl": "1.5.1",
"cider-nrepl": "0.58.0",
"cider/piggieback": "0.6.1"
}
but can't find any place with these ancient versionsSo this looks like a bug.
but not even sure why I have that there in my user settings ^^
What happens if you remove the settings?
same result
I also have this in the defaultSettings.json :
// By default Calva Jack-in will inject the latest `nrepl`, etcetera versions when starting the repl. Override this default behaviour by declaring which versions to use here.
"calva.jackInDependencyVersions": {
"nrepl": "1.5.1",
"cider-nrepl": "0.58.0",
"cider/piggieback": "0.6.1"
},i thought json lacked comments?
I think its more likely that I messed up somehow my settings then this is a calva bug ^^ probably otherwise more people would complain
but no clue how/where I could have changed the nrepl version that calva uses
oh wait, I am using cursor, not vscode in vscode it is working fine. ok, then something is wrong with my cursor setup
VS Code settings are JSONC, but still using .json file extension, iiuc.
Seems it can be a difference in Cursor and VS Code that we are unaware of. It’s very strange. But why would it result in thos funny and ancient version. That’s strange to a level of strange hard to comprehend. 😃
I fixed it but I am even more confused now.
I changed my settings.json by removing the "calva.jackInDependencyVersions" option, which was not solving the issue.
Now I added it back, and now it somehow works 😅
I have no clue why my computer is using 0.3.0 if I do not have this in my settings. Can't find any other settings where 0.3.0 is setup 🤷♂️
But anyways, it works now. Thanks for the help and the general great work! 🙏👏
Happy that it works. I think it points at a potential bug in Calva, but I guess we will see it again if so. Still curious. what if remove the settings now?