This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-12-20
Channels
- # adventofcode (17)
- # announcements (1)
- # aws (1)
- # beginners (102)
- # calva (27)
- # cider (16)
- # clj-commons (34)
- # clj-kondo (33)
- # cljs-dev (5)
- # cljsrn (4)
- # clojure (124)
- # clojure-europe (17)
- # clojure-nl (8)
- # clojure-spec (13)
- # clojure-uk (6)
- # clojurescript (68)
- # datahike (21)
- # datomic (23)
- # emacs (3)
- # fulcro (30)
- # introduce-yourself (6)
- # jobs-discuss (6)
- # lsp (31)
- # nextjournal (3)
- # off-topic (1)
- # other-languages (45)
- # portal (4)
- # re-frame (8)
- # releases (4)
- # shadow-cljs (39)
- # specter (6)
- # tools-build (18)
- # tools-deps (11)
What’s the best place to log diagnostic messages from the Calva test runner, that we would want users to be able to view when debugging issues?
For error messages I think the output/repl window works. If it’s a more verbose diagnostics level that the user can enable, then the Calva says output channel might be a good place.
thanks
Sorry to be dense here, but it looks like calva picked up the newest clojure-lsp, but some things aren’t working. Now when I add an undefined function call to a new project, there’s no indication that it’s bad. So I did lein create foo
opened it with calva, and in core.clj I typed (mynewfunc 1).
Calva is utilizing cider-nrepl and clojure-lsp to create this VS Code experience.
nREPL dependencies configured:
nrepl: 0.8.3
cider-nrepl: 0.26.0
cider/piggieback: 0.5.2
clojure-lsp version configured: latest
If you are new to Calva, please consider starting with the command:
**Calva: Fire up the Getting Started REPL**
(See `showCalvaSaysOnStart` in Settings to control the auto-showing of this message panel.)
clojure-lsp version used: 2021.12.20-00.36.56
clj-kondo version used: 2021.12.19
Oh, maybe it had something to do with the VPN? I saw this in the log:
2021-12-20T22:28:40.263Z INFO [clojure-lsp.feature.file-management:?] - Changes analyzed by clj-kondo took 0.04 secs with 39 tries
2021-12-20T22:28:40.309Z INFO [clojure-lsp.feature.file-management:?] - Changes analyzed by clj-kondo took 0.04 secs with 40 tries
2021-12-20T22:28:40.313Z WARN [clojure-lsp.feature.file-management:146] - Aborting changes due to too much retries: 41
I disconnected from the VPN, restarted calva and now I see the appropriate errors again. And I can verify that “Create Private Function” works!Eh, maybe I should say it sometimes works. It stopped working now, again on that small app. When it stops working previous errors wavy red lines get stuck in the editor and newly introduced errors don’t get displayed. Calva Connection Log says “Socket closed”.
And in Calva Language Client, I see this:
{
"range": {
"start": {
"line": 7,
"character": 1
},
"end": {
"line": 7,
"character": 11
}
},
"severity": 1,
"code": "unresolved-symbol",
"source": "clj-kondo",
"message": "Unresolved symbol: mynewfunc2",
"tags": []
}
where mynewfunc2 was created by the “Create Private Function” menu action, and is exactly where the call to the undefined function was before it got defined.
So I guess this problem is in Kondo?Aborting changes due to too much retries: 41
That's something I added on latest release regarding some concurrency issues, it should not happen all the time though, is your project big?I can repro these weird behavior @U02PB3ZMAHH of logging a lot of times:
Changes analyzed by clj-kondo took 0.04 secs with X tries
I think there is something to be improved there, could you try with this LSP config meanwhile?
{:linters {:clj-kondo {:async-custom-lint? false}}}
on your .lsp/config.edn
or .config/clojure-lsp/config.edn
@UKFSJSM38 That makes things work!
yeah, I'll try to fix it, the issue is that with that flag the performance is reduced for big buffers, but it makes things more stable
not sure in Calva, but in generic Paredit terms you are looking for an operation called Splice Sexp
the default shortcut may be ctrl + s
(on macs, not sure win/linux)
That worked. Thanks @U0ETXRFEW!
A command I find my self using surprisingly often is Splice Killing Backwards: ctrl+alt+shift+backspace
.
Me too. ctrl+alt+shift+backspace
is one of those "please don't change/remove this" kind of commands. So.. please don't change/remove it! 🙏 🙂 It's just too good.