This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-09-02
Channels
- # aleph (25)
- # announcements (17)
- # aws (2)
- # babashka (72)
- # beginners (44)
- # calva (6)
- # cider (3)
- # clj-kondo (109)
- # cljfx (1)
- # cljsrn (31)
- # clojure (151)
- # clojure-austin (1)
- # clojure-europe (36)
- # clojure-nl (5)
- # clojure-norway (2)
- # clojure-spec (17)
- # clojure-uk (12)
- # clojurescript (74)
- # cursive (57)
- # data-science (1)
- # datascript (28)
- # datomic (40)
- # depstar (15)
- # gratitude (3)
- # helix (3)
- # introduce-yourself (1)
- # joker (1)
- # kaocha (2)
- # leiningen (2)
- # lsp (70)
- # lumo (2)
- # malli (2)
- # meander (4)
- # off-topic (10)
- # polylith (27)
- # quil (4)
- # re-frame (18)
- # reagent (24)
- # ring (4)
- # rum (1)
- # shadow-cljs (102)
- # sql (2)
- # tools-deps (48)
- # web-security (8)
- # xtdb (5)
Thank you @borkdude and everyone that helped! This will be a huge help for the project and I'm really happy and excited to see the results of that funding!
I’m getting “Lisp nesting exceeds ‘max-lisp-eval-depth’” errors after lsp starts (sometimes emacs also freezes for a while first). The backtrace seems to suggest that it’s something to do with lsp-all-watchable-directories
(I think). Is there anything I can do to figure out why?
also check your max-lisp-eval-depth
variable , for me, doom-emacs sets that to 1600
Checking for Native JSON support: OK
Check emacs supports `read-process-output-max': OK
Check `read-process-output-max' default has been changed from 4k: OK
Byte compiled against Native JSON (recompile lsp-mode if failing when Native JSON available): OK
`gc-cons-threshold' increased?: OK
Using gccemacs with emacs lisp native compilation (): NOT AVAILABLE (OPTIONAL)
Even so, maybe it's a good idea ask on https://discord.gg/swuxy5AAgT
It still freezes for a while, and then Error processing message (error "Variable binding depth exceeds max-specpdl-size").
yeah, so, what I think it's happening is that lsp is scanning a lot of folders and probably a lot of them are not required to be analyzed, check your *lsp-log*
when server starts, it should print the folders/files being analyzed
probably (setq lsp-enable-file-watchers nil)
should fix, but not sure the file watchers feature is good for you
In lsp-log, I just have
Found the following clients for /path/file.clj: (server-id clojure-lsp, priority 0)
The following clients were selected based on priority: (server-id clojure-lsp, priority 0)
(`/path/file/clj` changed as it’s work stuff)I don't think so, there are better ways to solve that probably, like configuring lsp-mode to exclude specific folders from your project
There’s a couple of node_modules directories in here. Only one other large directory, I think
lsp-mode should log on *lsp-log*
the folders being analyzed, not sure why it's not logging :thinking_face:
Which way up are emacs backtraces? It starts like this:
` entered--Lisp error: (error “Lisp nesting exceeds ‘max-lisp-eval-depth’“)
file-truename(“/Users” (90) (nil))
file-truename(“/Users/djm” (90) (nil))
file-truename(“/Users/djm/Library” (90) (nil))
file-truename(“/Users/djm/Library/Containers” (90) (nil))
file-truename(“/Users/djm/Library/Containers/com.apple.Safari.CacheDeleteExtension” (90) (nil))
file-truename(“/Users/djm/Library/Containers/com.apple.Safari.CacheDeleteExtension/Data” (90) (nil))
file-truename(“/Users/djm/Library/Containers/com.apple.Safari.CacheDeleteExtension/Data/Library” (90) (nil))
file-truename(“/Users/djm/Library/Containers/com.apple.Safari.CacheDeleteExtension/Data/Library/WebKit” (90) (nil))
file-truename(“/Users/djm/Library/Containers/com.apple.Safari.CacheDeleteExtension/Data/Library/WebKit/WebsiteData” (90) (nil))
file-truename(“/Users/djm/Library/Containers/com.apple.Safari.CacheDeleteExtension/Data/Library/WebKit/WebsiteData/IndexedDB” (90) (nil))
file-truename(“/Users/djm/Library/Containers/com.apple.Safari.CacheDeleteExtension/Data/Library/WebKit/WebsiteData/IndexedDB/v0”)
lsp--all-watchable-directories(“/Users/djm/Library/Containers/com.apple.Safari.CacheDeleteExtension/Data/Library/WebKit/WebsiteData/IndexedDB/v0" (“[/\\\\]\\.git\\‘” “[/\\\\]\\.github\\‘” “[/\\\\]\\.circleci\\‘” “[/\\\\]\\.hg\\‘” “[/\\\\]\\.bzr\\’” “...``
Why would it be looking at /Users/djm/Library/Containers/com.apple.Safari.CacheDeleteExtension/Data/Library/WebKit/WebsiteData/IndexedDB/v0 😕
hum, really weird lsp-mode looking on that folder, I really suggest opening an issue on lsp-mode showing that
you can also debug lsp-mode code if you want starting from the lsp--all-watchable-directories
function
@ericdallo sorry about the :source-paths
bug, that one is my fault, lol. i’ve opened a pr that should fix it https://github.com/clojure-lsp/clojure-lsp/pull/540
i misread the settings page and thought both :source-paths
and :source-aliases
returns keywords
do you want the default to be nil
or #{}
?
I've asked this in the past and was told it was a project config error but i haven't solved it and have just been putting it off. I am using [clojure.test :refer :all]
in our test namespaces. lsp-ui is offering a warning "use alias or :refer [refer-all]" which doesn't make a lot of sense to me. And each usage of deftest
and is
is highlighted as an unknown symbol. How can i diagnose this?
me and @borkdude had this issue last week with an user, it was related with outdated clj-kondo analysis + outdated sqlite.db
can you please:
• confirm there is a .clj-kondo
dir on your project root
• if so rm .clj-kondo/.cache
and rm .lsp/sqlite.db
• restart the server
it's a must have a .clj-kondo
dir (future releases of clojure-lsp it should create automatically)
even being built-in, other thing should not working properly without the .clj-kondo dir, I suggest you creating it
@U11BV7MTK could you confirm the issue is fixed if you create a .clj-kondo/config.edn
with {}
?
then we can understand later why clj-kondo is not recognizing clojure.test built-in
excellent. that fixed it. i didn't realize i had to manually create a clj-kondo folder
just to explain how it works:
• clojure-lsp checks if there a .lsp/sqlite.db if so it doesn't call clj-kondo to analyze the whole classpath which takes a while
• when clj-kondo is analyzing the whole classpath, it persists in .clj-kondo/.cache
the transits from each namespace analyzed, but only if a .clj-kondo
folder exists
• when linting, it uses the cache so it knows external namespaces from classpath
That works for external libs, but clojure.test should be built-in on clj-kondo not depend on that kind of cache
@U11BV7MTK I intend to do https://github.com/clojure-lsp/clojure-lsp/issues/528 soon
thanks. just a data point: i'm ok with manually creating it. helps me add it to gitignore as well. Just didn't know i needed to
no problem is just that most users don't know (and they don't need to know) about how that works