calva

2025-04-30T07:41:37.705549Z

Hello 👋 I'm getting this mysterious error and unable to connect to the repl ever since yesterday

; Connecting ...
; Reading port file: file:///home/.../.shadow-cljs/nrepl.port ...
; Using host:port localhost:9000 ...
; Hooking up nREPL sessions ...
; Failed connecting.
I think it happened after a sudden crash of vscode. I restarted the os, there are no dungling processes that occupy port 9000 and the app is running and listening on that port:
$ shadow-cljs -d cider/cider-nrepl:0.55.7 watch cljstorm --aliases :cljstorm
shadow-cljs - config: /home/.../shadow-cljs.edn
shadow-cljs - starting via "clojure"
shadow-cljs - HTTP server available at 
shadow-cljs - HTTP server available at 
shadow-cljs - server version: 2.28.14 running at 
shadow-cljs - nREPL server started on port 9000
shadow-cljs - watching build :cljstorm
[:cljstorm] Configuring build.
[:cljstorm] Compiling ...
Reflection warning, meander/util/epsilon.cljc:758:24 - reference to field val can't be resolved.
[:cljstorm] Build completed. (363 files, 0 compiled, 0 warnings, 5.20s)
does anyone have a clue how to investigate this issue?

pez 2025-05-02T07:09:36.828889Z

That is so crazy. I really don’t understand this issue.

pez 2025-05-02T09:54:51.808729Z

Now I have understood it well enough to have hopes for that C fixes the issue with connecting: https://github.com/BetterThanTomorrow/calva/issues/2806#issuecomment-2846824052 That’s not to say that I have understood the issue as such. The A/B experiment outcome is truly worrying. But anyway.

✅ 1
Patrix 2025-05-03T03:47:45.914289Z

yup build C worked for me as well!

🙏 1
Patrix 2025-05-03T03:49:32.932039Z

and v2.0.506 works as well! Whew

🤘 1
pez 2025-05-01T07:11:41.500249Z

Many thanks, @patrix! I can’t reproduce still, but I think I now have spotted a key difference between the previous code and my refactored (if it can be called that when we don’t have tests for it!) code. New build should be available here https://app.circleci.com/pipelines/github/BetterThanTomorrow/calva/8737/workflows/1b546663-aa68-4081-b22b-81898516abca/jobs/49049/artifacts any minute now.

Patrix 2025-05-01T07:13:58.096909Z

I’ll test in a few hours

🙏 1
pez 2025-05-01T14:21:07.294859Z

Another shot in the dark at this error: https://github.com/BetterThanTomorrow/calva/issues/2806#issuecomment-2844933758

Patrix 2025-05-01T15:18:07.348269Z

heyy that one worked!

; Starting Jack-in: (cd /workspaces/test; clojure -Sdeps '{:deps {nrepl/nrepl {:mvn/version,"1.3.1"},cider/cider-nrepl {:mvn/version,"0.52.1"}}}' -M:dev:+default:+portal -m nrepl.cmdline --middleware "[cider.nrepl/cider-middleware]")
; Using host:port localhost:44485 ...
; Hooking up nREPL sessions ...
; Connected session: clj
; Evaluating code from settings: 'calva.autoEvaluateCode.onConnect.clj'
nil
clj꞉user꞉> 
"Please see 
about why stdout printed to this file is prepended with `;` to be line comments."
clj꞉user꞉> 
; Jack-in done.
clj꞉user꞉> 

pez 2025-05-01T15:23:49.980749Z

That is a bit crazy, but goes to prove that Rich Hickey is right about that most problems come from state… We really need to decomplect a lot of Calva’s parts. Thanks for testing and confirming! 🙏 I will have a closer look at the tiny changes and see if I can keep their intent and fix the connect issue.

👍 1
Patrix 2025-05-02T01:23:20.379789Z

I've replied in the issue as well that both test builds (A and B) you provided worked for me

2025-04-30T07:43:40.882019Z

P.S flowstorm is able to connect to that port

pez 2025-04-30T07:48:38.221469Z

Hi! I think this is a regression. Mentioned in replies here: https://clojurians.slack.com/archives/CBE668G4R/p1745744348413999 So you should be able to restore the connect behaviour by using version 2.0.501 of Calva (I may be misremembering the version, check the link). I can’t reproduce this yet. Can you see if there are errors in the dev console that can give us clues?

🙏 1
2025-04-30T08:00:03.461519Z

solved, thanks

pez 2025-04-30T08:01:40.734149Z

Please help me with checking the dev console log with the new not-working version. 🙏 I need to fix this, but I am blind without any more clues about it.

2025-04-30T08:02:52.618499Z

Sure, lets go at it where can I find the dev console?

pez 2025-04-30T08:08:37.895679Z

From the vs code help menu. Toggle Developer Tools

pez 2025-04-30T08:12:05.419839Z

Also. Please file an issue. There’s an option in the VS Code help menu to file an issue from there. Then it will attach some VS Code and OS info to the issue. In case this is related to that. (I doubt it is, this is a bad refactoring of mine, I am pretty sure.)

2025-04-30T10:25:06.224699Z

https://github.com/BetterThanTomorrow/calva/issues/2806 I dumped the logs from the devtool console in the issue. Tell me if you need more info or if you want me to try stuff

🙏 1
Patrix 2025-04-30T14:08:12.732049Z

I’m getting this too, with regular Clojure not shadow-cljs. Will try to get some logs as well. Works with 2.0.501

🙏 1
pez 2025-04-30T15:36:26.948479Z

I posted a comment in the issue with a link to a dev build that hopefully fixes the problem: https://github.com/BetterThanTomorrow/calva/issues/2806#issuecomment-2842391996 Please test it for me, as I can’t repro the problem yet. 🙏 ❤️ calva

2025-04-30T15:39:17.758869Z

🙏 I'll test it and report back (it won't happen immediately, I'm just heading out with my family)

🙏 1
Patrix 2025-05-01T06:13:19.203409Z

Posted the errors from the console log on my vscode (with v 2.0.504)

🙏 1
Patrix 2025-05-01T06:18:08.065949Z

and did the same with the test build

❤️ 1
Gabriel Rech 2025-04-30T11:58:23.297019Z

Hi folks, Any ideas why the formatter does not let me have line breaks? This seems to have started happening a few weeks back and I have not been able to find whatever config could have caused this, so I'm looking for ideas 🆘

Gabriel Rech 2025-04-30T11:58:44.133299Z

Gabriel Rech 2025-04-30T11:59:04.869569Z

• Calva version is 2.0.503 • Only seems to happen when clojure-lsp is up and running • nothing set up for configs like "editor.formatOnSave", its all default • calva configs:

"calva.fmt.configPath": "CLOJURE-LSP",
  "calva.paredit.defaultKeyMap": "original",
  "calva.prettyPrintingOptions": {
    "printEngine": "puget",
    "enabled": true,
    "width": 120,
    "maxLength": 50
  },
  "calva.definitionProviderPriority": [
    "lsp",
    "repl"
  ],
  "calva.fmt.newIndentEngine": false,
  "calva.legacyPrintBareReplWindowOutput": false,
  "calva.outputDestinations": {
    "evalResults": "terminal",
    "evalOutput": "terminal",
    "otherOutput": "terminal"
  },
  "calva.showCalvaSaysOnStart": false,
  "calva.autoOpenJackInTerminal": false,
  "calva.autoOpenREPLWindow": false,
  "calva.useLegacyReplWindowPath": false,
  "calva.autoOpenInspector": false,
  "calva.redirectServerOutputToRepl": false,

pez 2025-04-30T12:18:45.715169Z

We’ve had som regression around the formatter lately. Not seen anything that would be related to clojure-lsp, and that sounds very strange… there’s an issue with format on save https://github.com/BetterThanTomorrow/calva/issues/2789 For which we have cooked what hopefully is a fix. I have posted a link in the last comment there, but no one there seems to care so we’re a bit stuck. See if it fixes your issue there.

pez 2025-04-30T14:22:24.057479Z

I also now rediscovered this issue. https://github.com/BetterThanTomorrow/calva/issues/2787 (Too many issues right now!)

Gabriel Rech 2025-04-30T17:19:20.858569Z

Oh, https://github.com/BetterThanTomorrow/calva/issues/2787 seems to be the exact problem as I'm having

Gabriel Rech 2025-04-30T17:24:15.408269Z

Btw, enabling the new Ident engine does solve the problem for now, so gratitude-thank-you

pez 2025-04-30T19:12:10.011799Z

We should probably remove that old indent engine. I think that it, by some accident, used to fix things for Vim users, but I don’t think it is worth the cost it imposes in maintenance.