Fork me on GitHub
#lsp
<
2022-01-03
>
lassemaatta07:01:12

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
lassemaatta07:01:51

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]

lassemaatta07:01:21

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

ericdallo14:01:54

The lsp-ui PR was already reverted

ericdallo17:01:25

clojure-lsp Released clojure-lsp https://github.com/clojure-lsp/clojure-lsp/releases/tag/2022.01.03-15.41.19 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. https://github.com/clojure-lsp/clojure-lsp/issues/678 ◦ Fix expand let refactor duplicating variables in some cases. https://github.com/clojure-lsp/clojure-lsp/issues/676 ◦ 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

ericdallo18:01:37

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

ericdallo18:01:04

also try rm -rf .lsp/.cache

ericdallo18:01:10

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

ericdallo18:01:52

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

ericdallo19:01:21

let me try download orchard and test it

ericdallo19:01:00

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

ericdallo19:01:18

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

ericdallo19:01:15

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

ericdallo19:01:12

yeah, it does work on terminal for me:

ericdallo19:01:38

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:)

ericdallo19:01:00

Found the issue

ericdallo19:01:15

for some reason, clj-kondo outputs for orchard project

..................

ericdallo19:01:38

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

ericdallo19:01:20

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

ericdallo19:01:05

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

borkdude19:01:58

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

ericdallo19:01:16

hum, orchard does have this config

ericdallo19:01:19

makes sense now

ericdallo19:01:36

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

borkdude19:01:42

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

ericdallo19:01:16

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

ericdallo19:01:30

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

borkdude19:01:07

but clj-kondo should have printed this to stderr btw https://github.com/clj-kondo/clj-kondo/blob/51b10ac887f5b0deb28b3b8f749e1590ffa24458/src/clj_kondo/impl/analyzer.clj#L2487 I made this feature a long time ago and I didn't think anyone used it

ericdallo19:01:33

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

borkdude19:01:36

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

ericdallo19:01:55

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

ericdallo19:01:57

thanks for the help

ericdallo19:01:28

@U02EMBDU2JU fixed on clojure-lsp master

ericdallo19:01:52

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