Fork me on GitHub

I upgraded clojure-lsp this morning and I'm noticing quite a few errors in the *Messages* buffer. Any idea what might cause this? EDIT: it's a problem with lsp-ui, nevermind

all-clear 1

LSP :: Connected to [clojure-lsp:10583]. [2 times]
Error in post-command-hook (lsp-ui-sideline): (invalid-function lsp-ui--with-no-redisplay)
Error while checking syntax automatically: (invalid-function lsp-ui--with-no-redisplay)
Error running timer: (invalid-function lsp-ui--with-no-redisplay)
Error running timer 'lsp--on-idle': (invalid-function lsp-ui--with-no-redisplay) [5 times]
lsp-ui-peek--render: Invalid function: lsp-ui--mute-apply [2 times]
Error processing message (invalid-function lsp-ui--with-no-redisplay).
lsp-ui--workspace-path: Wrong type argument: arrayp, nil [2 times]


actually, I guess this is an issue with lsp-ui and not clojure-lsp, sorry 🙂


The lsp-ui PR was already reverted


clojure-lsp Released clojure-lsp with important fixes for analysis and minor improvements: • General ◦ Fix some analysis conflicts regarding `custom-async-lint?` feature introduced on latest release causing outdated analysis and some deadlocks. • Editor ◦ Fix inline symbol code action regression from previous releases. ◦ Fix expand let refactor duplicating variables in some cases. ◦ Add completion support to potemkin usages of a namespace. • API/CLI ◦ Wait for db cache upsert before end proccess, avoiding the need to re-lint whole classpath on next api/cli runs. ◦ Fix the need to use `:raw? true` on babashka pod usage. This release should fix analysis outdated and some deadlocks related to the custom-async-lint? which was implemented to improve lint performance + feedback but caused some issues, this should be fixed now.

👏 2
Lukas Domagala18:01:21

i just upgraded to the latest lsp version + calva and when trying to open the orchard repo I still get an endless load


Check clojure-lsp log, it's probably a configuration issue with your project, not related with latest release


also try rm -rf .lsp/.cache


and reload vcode window

Lukas Domagala18:01:47

i’ll try deleting the cache and restarting. it’s strange that only the orchard repo is having problems, everything else works fine


it could be some project issue so, checking the logs is the best way to find

Lukas Domagala19:01:57

i tried via console and that doesn’t produce a log file in that project the calva included start produces:

2022-01-03T18:56:06.582Z  ERROR [taoensso.timbre:796] - Uncaught exception on thread: main
 [37mclojure_lsp.main.main[m  [32m             [m
                   [37m...[m  [32m             [m
[33mclojure-lsp.main/[1;33m-main[m  [32mmain.clj: 169[m
[33mclojure-lsp.main/[1;33m-main[m  [32mmain.clj: 171[m
 [33mclojure-lsp.main/[1;33mexit[m  [32mmain.clj: 124[m
                   [37m...[m  [32m             [m
[1;31mjava.lang.NullPointerException[m: [3m[m

2022-01-03T18:56:06.853Z  INFO [clojure-lsp.server:310] - Parent process 44260 is not running - exiting server
2022-01-03T18:56:06.856Z  INFO [clojure-lsp.server:409] - Exitting...

Lukas Domagala19:01:25

btw orchard does include some strange corner cases in the code for testing purposes, so it might be a problem with that


let me try download orchard and test it


clojure-lsp works pretty well to me on this project with emacs, let me try calva


on calva there is something that it blocks clojure-lsp for some reason indeed


that's really odd, I can't find why only happens this on calva

Lukas Domagala19:01:30

is it working on the command line for you? mine keeps running but writes no log file


yeah, it does work on terminal for me:


I think I found something, one sec

Lukas Domagala19:01:24

i was running it as a server, diagnostics works for me as well if i can help fix the calva issue let me know. i just realized how anoying it is to run without lsp:)


Found the issue


for some reason, clj-kondo outputs for orchard project



and this crashes vscode communication with clojure-lsp for some reason, which makes sense as it's not allowed those chars, only json


2 questions there: • clojure-lsp should handle stdout output from kondo which I will fix it • why clj-kondo prints this dots only for some projects? maybe @U04V15CAJ can help help understand this


It looks sounds kind of loading from clj-kondo side, but I never saw that on other projects or didn't noticed it:


This is probably because of {:output {:progress true}}


hum, orchard does have this config


makes sense now


clojure-lsp should probably catch clj-kondo output and log to the file instead of stdout so


@UKFSJSM38 Do you add an additional config in lsp? You can override this by always setting it to false


yeah, we can override this or just log to file instead of stdout which makes sense to me


as clj-kondo can print other things in the future and may cause issues like that


but clj-kondo should have printed this to stderr btw I made this feature a long time ago and I didn't think anyone used it


haha, probably we should fix clj-kondo as well so


PR welcome to fix it or I'll fix it soon


no hurries, I already made the commit on clojure-lsp to catch stdout prints as well


thanks for the help


@U02EMBDU2JU fixed on clojure-lsp master


I think I'll do another patch release just to fix that

Lukas Domagala19:01:54

big thanks to both of you, the support time is unreal :)

🚀 1