calva

2025-10-20T19:05:01.382249Z

With the version 0.58.0 of cider-nrepl the load file op does not remove debug information anymore. So, two questions: 1. Is possible to update the https://github.com/BetterThanTomorrow/calva/blob/7974d596a538a803cabdb6715d7b717a11fefca7/package.json#L493-L495 of nrepl to 1.5.1 and cider-nrepl to 0.58.0 ? What is the process to update them? 2. Calva's documentation has a session to warn about the usage of load-file and eval on save . Should we add the information that with those versions this behavior does not exists anymore? I'll be happy to contribute with any of those items, just let me know what is the best approach.

pez 2025-10-25T09:57:14.045549Z

Right. I’ll wait with merging. πŸ˜ƒ I left some comments for when you return to the PR.

2025-10-21T10:55:56.865549Z

> Wanna have a go at it, @arthurfucher? @pez I would be happy to contribute, but I didn't get what will be the solution πŸ˜… Also, if you agree, may I send a PR to update the docs (https://calva.io/debugger/#loading-the-file-and-eval-on-save)?

pez 2025-10-21T11:45:26.170229Z

Yes, docs fixes are super welcome.

pez 2025-10-21T11:59:48.611249Z

@arthurfucher I think the solution is: 1. Create a Calva command that fetches the latest versions and stores them in extension global storage. β—¦ @seancorfield’s command line there, involving clojure -X:deps find-versions :lib $lib, but using node to shell out (there is prior art) β—¦ falls back on something hardcoded in Calva (maybe there are lein people who do not have clojure?) 2. We also run this version fetching as part of Calva start 3. The current settings are retrofitted (same names) to override whatever is in extension global storage 4. Jack-in uses the settings first, otherwise global storage, otherwise hardcoded versions The end result would be that anyone who today uses Calva defaults, will keep using them (even if they now will mean latest shiny nrepl stuff). And that anyone that has configured their own versions, will continue to use those. We can include the current versions in the changelog so that it is easy for someone who’s not ready to use latest to go back to what we have today. Does this make sense? Also remember that in Calva dev, it starts with an issue stating the problem. πŸ˜ƒ

pez 2025-10-21T12:03:03.586929Z

I will be available for any help you may need. There is EDN parsing going on in some places in the code base (for getting the versions out of the find-versions command).

2025-10-21T14:23:43.263149Z

PR updating doc: https://github.com/BetterThanTomorrow/calva/pull/2958

πŸ™ 1
2025-10-21T14:32:18.402409Z

Thanks @pez, makes sense! I'll try to tackle this... if I need any help, I'll let you know. Created the https://github.com/BetterThanTomorrow/calva/issues/2959, also added the proposed solution there to be easier.

seancorfield 2025-10-20T19:22:26.707769Z

Calva settings:

seancorfield 2025-10-20T19:22:53.995029Z

I currently have:

"calva.jackInDependencyVersions": {
      "nrepl": "1.5.0",
      "cider-nrepl": "0.58.0",
      "cider/piggieback": "0.6.0"
    },
(I need to update nREPL again)

πŸ‘ 1
2025-10-20T19:23:43.703559Z

Yeah, I've updated it manually here in my settings, but I think that would be good to have the default updated also.

seancorfield 2025-10-20T19:25:36.341159Z

Yeah, it always lags behind a bit...

pez 2025-10-20T19:27:40.000009Z

Maybe we should do like we do with clojure-lsp and default to the latest versions, and allow pinning by specifying a version?

seancorfield 2025-10-20T19:28:08.526529Z

You mean "RELEASE" even tho' that's deprecated? πŸ™‚

pez 2025-10-20T19:28:45.920839Z

Yeah, we use latest with clojure-lsp πŸ˜ƒ

pez 2025-10-20T19:30:51.917299Z

A bit like add-libs does too. It just defaults to latest if no version is specified.

pez 2025-10-20T19:31:25.813939Z

Wanna have a go at it, @arthurfucher?

seancorfield 2025-10-20T19:31:45.530589Z

RELEASE and LATEST mean different things tho'. The latter includes SNAPSHOT builds which, maybe, we wouldn't want?

seancorfield 2025-10-20T19:32:39.127379Z

(and the caveat that both of those kinda "break" the .cpcache algo for refreshing deps since they don't change when the version changes)

pez 2025-10-20T19:32:44.722599Z

With clojure-lsp we use latest and nighly. Just because that’s what clojure-lsp uses. The name is not so important, the behaviour is.

seancorfield 2025-10-20T19:33:16.862609Z

Right. But the jack-in dep versions end up being passed to the Clojure CLI, which is why I made this point.

pez 2025-10-20T19:33:38.759989Z

So, by not specifying a version we go for latest.

seancorfield 2025-10-20T19:34:00.319529Z

You can't omit the version in a CLI invocation tho'

pez 2025-10-20T19:34:16.378009Z

We can figure out what the latest versions are and pass those?

seancorfield 2025-10-20T19:35:17.610839Z

How? Running clojure -X:deps find-versions ... and parsing the output for each of those libs?

pez 2025-10-20T19:35:57.414509Z

I haven’t thought about how. πŸ˜ƒ

seancorfield 2025-10-20T19:36:06.227599Z

Heh, I have...

pez 2025-10-20T19:37:26.235319Z

Is what you floated there feasible?

seancorfield 2025-10-20T19:39:14.275529Z

Since you have three deps, I would not recommend running the CLI for each of those to find the latest version, just to figure out what to pass to the jack-in command. That was a sarcastic/rhetorical question. You could just pass RELEASE in the jack-in CLI as the :mvn/version and it would "work", modulo the caching issue.

seancorfield 2025-10-20T19:40:08.068929Z

I think using RELEASE would mean it would only check for a new version once a day but I'd probably have to confirm that with Alex...

seancorfield 2025-10-20T19:40:23.649899Z

I could ask in #tools-deps...

pez 2025-10-20T19:44:05.811959Z

Ah, but that’s fine. If someone needs a new version quicker than that, they can clear the cache, I guess?

seancorfield 2025-10-20T19:44:36.327309Z

Yeah, or override the jack-in deps settings.

seancorfield 2025-10-20T19:45:03.267689Z

I just wanted to point out that it won't necessarily pick up new releases "immediately"...

seancorfield 2025-10-20T19:53:50.880579Z

Per Alex, it seems like this case would only cause new versions of the jack-in deps to be checked if the project deps were updated. If you don't update deps.edn, the cached basis etc would never change, and the deps will never be requested -- so jack-in deps would go stale.

seancorfield 2025-10-20T19:57:37.948209Z

Perhaps the way to go with this is to include that clojure -X:deps find-versions ... stuff in Calva's CI so that each new release of Calva always has the latest jack-in deps at that point in time?

seancorfield 2025-10-20T19:57:52.748619Z

Given how often you release new versions, that seems like a good compromise...

pez 2025-10-20T20:03:37.484399Z

It still requires a release to update these. I would like to avoid that, if we can. Calva could have a command for updating the versions. This command runs on start of Calva, and can also be run at will. Jack-in uses whatever versions have been discovered latest.

seancorfield 2025-10-20T20:03:38.141229Z

(!1999)-> for lib in nrepl/nrepl cider/cider-nrepl cider/piggieback; do echo -n "$lib " && clojure -X:deps find-versions :lib $lib :
n 1 2> /dev/null; done
nrepl/nrepl {:mvn/version "1.5.1"}
cider/cider-nrepl {:mvn/version "0.58.0"}
cider/piggieback {:mvn/version "0.6.1"}

1
2025-10-27T19:33:55.244499Z

marked the PR as ready for review πŸ˜‡ β€’ addressed your comments β€’ add an integration test (let me know what do you think about the test itself) β€’ Updated docs

pez 2025-10-27T20:42:21.328779Z

Thanks! Taking a look and taking it for a spin!

pez 2025-10-27T21:24:02.908169Z

Works like a charm! At least the happy path.

2025-10-24T22:47:02.714049Z

I've created a draft PR to get feedback πŸ˜‡ https://github.com/BetterThanTomorrow/calva/pull/2960

πŸ™ 1
pez 2025-10-24T23:11:13.172079Z

So sweet! I’ll look a bit closer tomorrow, and probably merge. Things look very tidy!

πŸ’œ 1
2025-10-24T23:14:28.159249Z

No need to hurry up, enjoy the weekend

pez 2025-10-24T23:16:35.426139Z

Merging PRs like this is my idea of a sweet weekend. πŸ˜ƒ

πŸ˜‚ 1
2025-10-25T00:03:26.305989Z

Ohh about merging, I think that it still require some changes.. Like default versions, docs.. And probably I will not have much time to take a look this weekend