This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-03-15
Channels
- # announcements (10)
- # asami (5)
- # babashka (49)
- # babashka-sci-dev (8)
- # beginners (25)
- # calva (98)
- # cider (2)
- # clj-kondo (22)
- # clojure (32)
- # clojure-dev (12)
- # clojure-europe (32)
- # clojure-nl (3)
- # clojure-spec (3)
- # clojure-uk (10)
- # clojurescript (12)
- # community-development (1)
- # conjure (71)
- # cursive (7)
- # datalog (6)
- # events (2)
- # figwheel-main (2)
- # fulcro (4)
- # jobs (2)
- # kaocha (3)
- # lsp (43)
- # membrane (12)
- # missionary (9)
- # off-topic (61)
- # pathom (7)
- # polylith (2)
- # reagent (38)
- # remote-jobs (4)
- # shadow-cljs (17)
- # specter (1)
- # tools-deps (38)
- # vim (51)
- # web-security (5)
Is the placement of the clojure-lsp log predictable? It's in /tmp/clojure-lsp.out
on my machine. I want to have a command in Calva to open this log even when the server has failed to start, and currently we rely on the server to do it.
this happens because:
• we check log-path during initialization to then update the log-path
• we use JVM safe temp path until we check user log-path, we do that because there are some machines like some macs that don't have write permission on /tmp/
the log-path is configurable via log-path
setting, but it will be checked in a certain point during server initialization
It's this issue that I am looking at. I'm running out of ideas what to suggest the user to test. https://github.com/BetterThanTomorrow/calva/issues/1590
Hum, what happens when user try to run clojure-lsp manually like ./clojure-lsp --version
?
but I agree we could use a more determinist log-path as the initial log-path, but I'm not aware of any folder that always has write permission, JDK is the most reliable way IMO but it's always a random folder hash
Maybe we should set .lsp/clojure-lsp.out as the default? Or at least as the default for calva?
my concern was that this was a critical crash if user doesn't have write permissions, but I doubt one would not have write permission on the project its working
Could have a fallback to the current way if the write fails. In vscode it could actually happen on a remote git repo, so your fear is not unfounded
yeah, I think we could handle the critical failure, sounds a good idea, feel free to open a issue @U0ETXRFEW
the log file also gets large especially when the path is static. i believe, on osx at least, the os is allowed to wipe files in official tmp folders to save space.
Very good point, @U0BUV7XSA. /tmp is a very good place for log files like this. 😃
yes, but we could wipe the log every new session to avoid huge files too, maybe some testing in a big repro working for a few hours to see how big that log becomes
Is there a way to find all available implementations of the method in the protocol?
uh actually failing to use it in emacs, is it lsp-find-implementation
?
I made some improvements on master these days that should be available on next release
downloading 👀
oh I think it doesn’t work for me because I kinda hide implementation behind the generator function eg
(defn make-service [db]
(reify Foo
(bar [_]
(+ 1 2))))
or I’m just dumb
almost sure we don't add reify to protocol-impls, right @U04V15CAJ?
@UKFSJSM38 not yet, we should
Created https://github.com/clj-kondo/clj-kondo/issues/1613 in clj-kondo
. Do you want me to create one in clojure-lsp
?
thank you guys 💜
some undesirable formatting going on here:
do you have a repro snippet? (the code doesn't need to compile, cljfmt doesn't check that)
i don't as it went away and i moved on. Next time ill try to share a github snippet and more diagnostics. I have seen it a couple times, this time it lingered a bit longer.