Fork me on GitHub
#lsp
<
2022-03-11
>
borkdude11:03:20

@ericdallo I hit the laptop-heating loop thing again after a git branch switch.

$ clojure-lsp --version
clojure-lsp 2022.02.23-12.12.12
clj-kondo 2022.03.04

ericdallo11:03:50

Oh no :/ Could you get server logs?

ericdallo11:03:11

Also, do you have lsp-enable-file-watchers enabled?

borkdude12:03:16

2022-03-11T11:32:49.333Z  INFO [clojure-lsp.feature.file-management:?] - changes analyzed by clj-kondo took 0.17 secs
2022-03-11T11:32:49.534Z  INFO [clojure-lsp.feature.file-management:?] - changes analyzed by clj-kondo took 0.20 secs
2022-03-11T11:32:49.681Z  INFO [clojure-lsp.feature.file-management:?] - changes analyzed by clj-kondo took 0.15 secs
2022-03-11T11:32:49.829Z  INFO [clojure-lsp.feature.file-management:?] - changes analyzed by clj-kondo took 0.15 secs
2022-03-11T11:32:49.988Z  INFO [clojure-lsp.feature.file-management:?] - changes analyzed by clj-kondo took 0.16 secs
2022-03-11T11:32:50.166Z  INFO [clojure-lsp.feature.file-management:?] - changes analyzed by clj-kondo took 0.18 secs
2022-03-11T11:32:50.315Z  INFO [clojure-lsp.feature.file-management:?] - changes analyzed by clj-kondo took 0.15 secs
2022-03-11T11:32:50.591Z  INFO [clojure-lsp.feature.file-management:?] - changes analyzed by clj-kondo took 0.28 secs
2022-03-11T11:32:50.744Z  INFO [clojure-lsp.feature.file-management:?] - changes analyzed by clj-kondo took 0.15 secs
2022-03-11T11:32:50.894Z  INFO [clojure-lsp.feature.file-management:?] - changes analyzed by clj-kondo took 0.15 secs
2022-03-11T11:32:51.042Z  INFO [clojure-lsp.feature.file-management:?] - changes analyzed by clj-kondo took 0.15 secs
2022-03-11T11:32:51.192Z  INFO [clojure-lsp.feature.file-management:?] - changes analyzed by clj-kondo took 0.15 secs
2022-03-11T11:32:51.344Z  INFO [clojure-lsp.feature.file-management:?] - changes analyzed by clj-kondo took 0.15 secs
2022-03-11T11:32:51.565Z  INFO [clojure-lsp.feature.file-management:?] - changes analyzed by clj-kondo took 0.22 secs
2022-03-11T11:32:51.712Z  INFO [clojure-lsp.feature.file-management:?] - changes analyzed by clj-kondo took 0.15 secs
2022-03-11T11:32:51.862Z  INFO [clojure-lsp.feature.file-management:?] - changes analyzed by clj-kondo took 0.15 secs
2022-03-11T11:32:52.013Z  INFO [clojure-lsp.feature.file-management:?] - changes analyzed by clj-kondo took 0.15 secs
2022-03-11T11:32:52.159Z  INFO [clojure-lsp.feature.file-management:?] - changes analyzed by clj-kondo took 0.15 secs
2022-03-11T11:32:52.307Z  INFO [clojure-lsp.feature.file-management:?] - changes analyzed by clj-kondo took 0.15 secs
2022-03-11T11:32:52.482Z  INFO [clojure-lsp.feature.file-management:?] - changes analyzed by clj-kondo took 0.17 secs
2022-03-11T11:32:52.683Z  INFO [clojure-lsp.feature.file-management:?] - changes analyzed by clj-kondo took 0.20 secs
2022-03-11T11:32:52.831Z  INFO [clojure-lsp.feature.file-management:?] - changes analyzed by clj-kondo took 0.15 secs
2022-03-11T11:32:52.991Z  INFO [clojure-lsp.feature.file-management:?] - changes analyzed by clj-kondo took 0.16 secs
2022-03-11T11:32:53.149Z  INFO [clojure-lsp.feature.file-management:?] - changes analyzed by clj-kondo took 0.16 secs
2022-03-11T11:32:53.299Z  INFO [clojure-lsp.feature.file-management:?] - changes analyzed by clj-kondo took 0.15 secs
2022-03-11T11:32:53.456Z  INFO [clojure-lsp.feature.file-management:?] - changes analyzed by clj-kondo took 0.16 secs
2022-03-11T11:32:53.745Z  INFO [clojure-lsp.feature.file-management:?] - changes analyzed by clj-kondo took 0.29 secs
2022-03-11T11:32:53.890Z  INFO [clojure-lsp.feature.file-management:?] - changes analyzed by clj-kondo took 0.14 secs

borkdude12:03:57

(setq gc-cons-threshold (* 100 1024 1024)
      read-process-output-max (* 1024 1024)
      treemacs-space-between-root-nodes nil
      lsp-headerline-breadcrumb-enable nil
      company-idle-delay 0.5
      lsp-idle-delay 0.5
      company-minimum-prefix-length 1
      lsp-lens-enable t
      lsp-enable-file-watchers nil
      lsp-file-watch-threshold 10000
      lsp-signature-auto-activate nil
      lsp-clojure-custom-server-command '("/Users/borkdude/Dropbox/bin/clojure-lsp")
      lsp-diagnostics-provider :none
      lsp-enable-indentation nil ;; uncomment to use cider indentation instead of lsp
      ;; lsp-enable-completion-at-point nil ;; uncomment to use cider completion instead of lsp

      lsp-completion-provider :capf
      lsp-enable-on-type-formatting nil)

ericdallo12:03:06

Yeah, quite odd, could you try with: (setq lsp-enable-file-watchers nil)

borkdude12:03:03

but it's already nil:

ELISP> lsp-enable-file-watchers
nil

ericdallo12:03:09

So the issue is not related with file watches indeed, it seems to be a really corner case on the core async chan that we process the changes

ericdallo12:03:35

It's weird that happens with git switch

ericdallo12:03:42

Hum, I 'll give it a try later trying to switch to this commit

ericdallo12:03:05

But it seems it happens switching to branches with a lot of changes right?

borkdude12:03:13

yeah, it seems so

ericdallo12:03:22

Thanks for the report, sounds like something we should fix as soon we find the issue

💯 1
ericdallo01:03:00

@U04V15CAJ I have a suggestion as one more try: • disable the setting :notify-references-on-file-change I doubt it could be that, but if we confirm even that doesn't fix, the only place is the normal didChange method to debug later.

jacob.maine02:03:39

I’m still having this problem too. Actually, I spent a good chunk of the day researching it. I think I’ve figured out what’s happening, though I don’t know how to fix it. I’ll report my findings in the https://github.com/clojure-lsp/clojure-lsp/issues/796

borkdude12:03:58

Happened again, after a git switch.

ericdallo12:03:57

@U04V15CAJ I think @U07M2C8TT probably found the issue, I'm double checking, but we are close to a fix 🤞

ericdallo12:03:11

meanwhile lsp-workspace-restart will fix for you

mkvlr19:03:16

wow, thanks for the deep dive @U07M2C8TT! I’ve been running into lsp being a CPU hog frequently so I look forward to trying your fix.

1
ericdallo19:03:04

@U5H74UNSF we just merged @U07M2C8TT try into master, you can try from #clojure-lsp-builds nighly release :)

mkvlr19:03:54

@ericdallo cool, I’ll try it at my iMac tomorrow and let you know

jacob.maine19:03:34

I hope it works! It may not… I know of one scenario where it may still get stuck. We’ll see soon though.

👍 1