This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-12-17
Channels
- # adventofcode (25)
- # announcements (2)
- # babashka (16)
- # babashka-sci-dev (16)
- # beginners (213)
- # calva (15)
- # clj-kondo (126)
- # clj-on-windows (1)
- # cljdoc (5)
- # cljfx (1)
- # cljs-dev (6)
- # clojure (230)
- # clojure-europe (38)
- # clojure-nl (3)
- # clojure-uk (3)
- # conjure (10)
- # core-async (15)
- # cursive (33)
- # fulcro (58)
- # hyperfiddle (4)
- # jobs-discuss (1)
- # kaocha (5)
- # lsp (46)
- # meander (3)
- # off-topic (30)
- # polylith (10)
- # portal (9)
- # re-frame (5)
- # reitit (7)
- # releases (2)
- # ring (17)
- # sci (8)
- # shadow-cljs (6)
- # specter (1)
- # sql (1)
- # testing (9)
- # tools-deps (4)
- # vim (12)
I have a project where clojure-lsp --verbose diagnostics
hangs at [ 0%] clojure-lsp
with 100% cpu. No explicit lsp config. clojure-lsp 2021.12.01-12.28.16.
Any hints on how to debug this?
It runs without issue. All the dependencies are in the :dev
alias though, if that makes any difference.
I never saw it blocks on 0%, something weird happening during this code: https://github.com/clojure-lsp/clojure-lsp/blob/master/src/clojure_lsp/crawler.clj#L193-L213
I suspect that is something resolving the project config: https://github.com/clojure-lsp/clojure-lsp/blob/master/src/clojure_lsp/config.clj#L58-L65
do you have any .lsp/config.edn
or in your ~/.lsp/config.edn
or ~/.config/clojure-lsp/config.edn
?
have tried with and without .lsp/config.edn
, and I don’t have a ~/.config/clojure-lsp/config.edn
I was about to release new clojure-lsp version today, probably worth wait for this fix 😅
it’s the loop in resolve-deps-source-paths
. Unfortunately I have to step away from this for a while
thanks, that's already help me to start debugging later today, I just need to repro that in some polylith repo
I have a base with the same name as the project. I suspect a :local/root
has a ../name
path which is getting resolved at the project root level, rather than relative to the deps file in which it is a declared as a dependency. Yet to verify that though.
the project is at https://github.com/hugoduncan/criterium/pull/45/commits/b0d366ef9ecfff85148aa3208c56703db023402d

maybe related to the issue?? https://github.com/clojure-lsp/clojure-lsp/pull/672
Let's wait to see what @UUKPL2T9C thinks, but I suspect it's related, anyway we should add a try catch there for any error on that process, to log a better message
you meant a relative path right? the issue happens when it's an absolute path, right?
resolving local/root paths to be relative to their deps.edn file seems to fix things. https://github.com/clojure-lsp/clojure-lsp/commit/29835afdef80201f0490e04eeb42de6f5fbb1b9e
@U0HFRSY0M I'll merge @UUKPL2T9C PR's right now, it should fix your issue so
@U0HFRSY0M I merged, could you try later with latest clojure-lsp, I'll try here as well
is there some setup to make make test
work - it complains “java.lang.ClassNotFoundException: clojure.tools.reader.reader_types.Reader”
@U0HFRSY0M looks good to me, can you open an PR adding a test as well? that source-paths discovery have too many corner cases 😅