This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-03-21
Channels
- # announcements (13)
- # babashka (63)
- # babashka-sci-dev (64)
- # beginners (37)
- # biff (1)
- # calva (10)
- # cider (7)
- # clj-kondo (15)
- # cljsrn (6)
- # clojure (26)
- # clojure-dev (10)
- # clojure-europe (34)
- # clojure-france (9)
- # clojure-nl (2)
- # clojure-norway (36)
- # clojure-uk (5)
- # clojurescript (142)
- # community-development (1)
- # conjure (3)
- # datalevin (5)
- # datalog (2)
- # datomic (5)
- # events (11)
- # fulcro (40)
- # gratitude (9)
- # guix (32)
- # honeysql (10)
- # jobs (2)
- # lsp (32)
- # malli (15)
- # meander (5)
- # membrane (43)
- # missionary (3)
- # nextjournal (9)
- # off-topic (38)
- # pathom (3)
- # polylith (30)
- # portal (78)
- # programming-beginners (4)
- # quil (6)
- # re-frame (20)
- # reagent (21)
- # remote-jobs (2)
- # shadow-cljs (7)
- # tools-deps (6)
- # xtdb (23)
I'm trying to figure out which way to fix a bug introduced here: https://github.com/clojure-lsp/clojure-lsp/pull/716/files#diff-c4f2705d9ea712285fa2f27dcfacf16733b610505fc7d60229ffd9896f5d5a23R278
introduce-let
at the bottom of a file will wrap the whole file in a let binding.
My idea is to only skip-whitespace z/up
when we're not at edit/top?
. The problem is that it breaks the from trailing comment
test in introduce-let-test
Is it ok if this test produced nil
?
If not, these tests are all pretty inconsistent as it stands, feels weird that a trailing comment is "part of" the previous form depending on if the cursor is touching it or if something comes after it. Any ideas?:
(h/code "(inc a)|" ";; comment")
(h/code "(inc a)" "|;; comment")
(h/code "(inc a)" "|;; comment" "")
(h/code "(inc a)" "|;; comment" "x")
cc @jacob.maine@U0BUV7XSA it’s fine to return nil in that case. Those tests were all added when we changed the parser to return a comment or whitespace node if that’s what the cursor was on. There were lots of refactorings that threw errors if they were invoked on a comment at the end of a file, and the fix was usually to move to some valid node before continuing with the refactoring. I wasn’t always sure whether the exceptions had always been there or if they were from the parser change, but in any case, I fixed as many as I could find. It wasn’t too important to me what was returned in those locations, just that there weren’t any exceptions. So, those tests were added at that time to prevent regressions. There are other scenarios where I think it does make sense to move up before introducing a let, if you’re on whitespace or comment. There should be tests for those cases. But I agree, it obviously doesn’t make sense if you’re already at the top.
Since lately (roundabout 3 weeks) I was not able anymore to use go to definition anymore when the definition is in a different namespace. lsp logs "No location found". I am using Neovim and was using latest release of clojure-lsp, today I tried with the latest build on CI. It was working and then stopped working after I updated nvim-plugins and clojure-lsp. Anyone has an idea where to search for the problem? Anyone ever seen this behaviour?
it was leiningen-projects that had these problems. now trying a deps-project and it does not even send the event. :thinking_face:
I have the feeling that it is a classpath problem but not sure why. it works on one machine...same setup but this one it does not
so it seems just to be very slow in analyzing classpath. now 10 minutes in into a new project and it just logged 36 percent analyzed
ok, it works fine in the deps-project but not in the leiningen-project... :thinking_face:
oh no...found it... leiningen was printing Warning: profile :profiles/dev not found.
to stdout before printing the classpath
maybe it would be good to give a more concise message when the classpath can not be parsed?
seeing same problem in another repo though 😢 there the classpath is properly printed to stdout
Maybe check if there is anything useful on https://clojure-lsp.io/troubleshooting/#server-log
I love it. How did this happen?
a wrong apply
😅
(defn my-print [msg]
(apply println msg))
(my-print "foo")
f o o
=> nil
Oooh yeah haha nice