Fork me on GitHub
#lsp
<
2021-03-30
>
anonimitoraf12:03:23

I forgot the reason why workspace symbols need to be prefixed with clj?

ericdallo14:03:27

They don't need anymore, it was fixed some releases ago:

anonimitoraf20:03:11

Oh right. I'll try it out in a bit thanks! Out of curiosity, why was it needed before?

ericdallo20:03:13

because it was filtering only on client side, clojure-lsp was returning all symbols ignoring the query

ericdallo20:03:25

now, we filter on server side using a fuzzy match

ericdallo21:03:29

weird, is it not filtering anything?

anonimitoraf21:03:41

Nope, unless I put in some prefix

anonimitoraf21:03:21

Oh, do I have to wipe out my LSP/kondo database files?

ericdallo21:03:41

not really, it should work :thinking_face:

anonimitoraf21:03:37

I wonder if it's a cljs thing. Let me try on a clj project

ericdallo21:03:57

it worth the try

ericdallo21:03:23

Could you post the output of lsp-clojure-server-info ?

anonimitoraf21:03:30

Hmm, same behavior in a clj project

anonimitoraf21:03:49

LSP :: {:project-root "file:///home/anonimito/sandbox/clojure-sandbox",
 :project-settings {:cljfmt {:indents {>defn [[:inner 0]]}}},
 :client-settings
 {:dependency-scheme "jar",
  :source-paths #{"src" "test"},
  :macro-defs {},
  :project-specs nil,
  :cljfmt {:indents {}},
  :document-formatting? true,
  :document-range-formatting? true},
 :port "NREPL only available on :debug profile (`make debug-bin`)",
 :server-version "2021.03.30-20.42.34",
 :clj-kondo-version "2021.03.22-SNAPSHOT",
 :log-path "/tmp/clojure-lsp.3842339907995882215.out"}

ericdallo21:03:13

it could be a graalvm error

ericdallo21:03:22

let me test it with the native binary

ericdallo21:03:36

also, check if there is any error on clojure-lsp std err buffer

anonimitoraf21:03:39

Oh, how do I know if I'm using the graalvm one?

anonimitoraf21:03:02

Empty clojure-lsp stderr

ericdallo21:03:23

the native you downloaded is the graalvm one

anonimitoraf21:03:02

Ah, how does one download a non-native one?

anonimitoraf21:03:16

NVM, I see the releases have native in them

ericdallo21:03:36

the only way is compiling manyally or download the deprecated clojure-lsp file from release

ericdallo21:03:45

anything on the log?

/tmp/clojure-lsp.3842339907995882215.out

anonimitoraf21:03:14

Actually, I actually probably want a non-native one since I have long-running projects, right? Also, do you mean this is deprecated?

ericdallo21:03:45

not really, the native one should work well for all project kinds

šŸ‘ 3
ericdallo21:03:51

yes, that one

anonimitoraf21:03:46

2021-03-30T21:41:13.203Z home-desktop INFO [clojure-lsp.main:391] - Starting server...
2021-03-30T21:41:13.206Z home-desktop DEBUG [clojure-lsp.nrepl:24] - nrepl not found, skipping nrepl server start...
2021-03-30T21:41:13.211Z home-desktop INFO [clojure-lsp.main:293] - Initializing...
2021-03-30T21:41:13.670Z home-desktop INFO [clojure-lsp.crawler:162] - Paths analyzed, took 0.010028586 secs. Caching for next startups...
2021-03-30T21:41:13.670Z home-desktop DEBUG [clojure-lsp.main:?] - :initialize 458ms
2021-03-30T21:41:13.673Z home-desktop INFO [clojure-lsp.main:339] - Initialized!
2021-03-30T21:41:13.673Z home-desktop DEBUG [clojure-lsp.main:?] - :initialized 0ms
2021-03-30T21:41:13.679Z home-desktop DEBUG [clojure-lsp.main:?] - :didOpen 4ms
2021-03-30T21:41:13.684Z home-desktop DEBUG [clojure-lsp.main:?] - :documentSymbol 2ms
2021-03-30T21:41:13.684Z home-desktop DEBUG [clojure-lsp.main:?] - :documentSymbol 0ms
2021-03-30T21:41:13.685Z home-desktop DEBUG [clojure-lsp.main:?] - :documentHighlight 1ms
2021-03-30T21:41:13.685Z home-desktop DEBUG [clojure-lsp.main:?] - :documentHighlight 0ms
2021-03-30T21:41:13.690Z home-desktop DEBUG [clojure-lsp.main:?] - :codeAction 6ms
2021-03-30T21:41:13.690Z home-desktop DEBUG [clojure-lsp.main:?] - :codeAction 7ms
2021-03-30T21:41:13.782Z home-desktop DEBUG [clojure-lsp.main:?] - :documentHighlight 0ms
2021-03-30T21:41:13.783Z home-desktop DEBUG [clojure-lsp.main:?] - :codeAction 1ms
2021-03-30T21:41:15.672Z home-desktop DEBUG [clojure-lsp.main:?] - :workspaceSymbol 1ms
2021-03-30T21:41:17.295Z home-desktop DEBUG [clojure-lsp.main:?] - :workspaceSymbol 0ms
2021-03-30T21:41:17.447Z home-desktop DEBUG [clojure-lsp.main:?] - :workspaceSymbol 0ms
2021-03-30T21:41:17.631Z home-desktop DEBUG [clojure-lsp.main:?] - :workspaceSymbol 0ms
2021-03-30T21:41:17.719Z home-desktop DEBUG [clojure-lsp.main:?] - :workspaceSymbol 0ms
2021-03-30T21:41:17.895Z home-desktop DEBUG [clojure-lsp.main:?] - :workspaceSymbol 0ms
2021-03-30T21:41:18.087Z home-desktop DEBUG [clojure-lsp.main:?] - :workspaceSymbol 0ms
2021-03-30T21:41:18.215Z home-desktop DEBUG [clojure-lsp.main:?] - :workspaceSymbol 0ms
2021-03-30T21:41:35.140Z home-desktop DEBUG [clojure-lsp.main:?] - :documentHighlight 0ms
2021-03-30T21:41:35.141Z home-desktop DEBUG [clojure-lsp.main:?] - :hover 0ms
2021-03-30T21:41:35.141Z home-desktop DEBUG [clojure-lsp.main:?] - :codeAction 1ms
2021-03-30T21:41:39.055Z home-desktop INFO [clojure-lsp.producer:15] - {:type :info, :message "{:project-root \"file:///home/anonimito/sandbox/clojure-sandbox\",\n :project-settings {:cljfmt {:indents {>defn [[:inner 0]]}}},\n :client-settings\n {:dependency-scheme \"jar\",\n  :source-paths #{\"src\" \"test\"},\n  :macro-defs {},\n  :project-specs nil,\n  :cljfmt {:indents {}},\n  :document-formatting? true,\n  :document-range-formatting? true},\n :port \"NREPL only available on :debug profile (`make debug-bin`)\",\n :server-version \"2021.03.30-20.42.34\",\n :clj-kondo-version \"2021.03.22-SNAPSHOT\",\n :log-path \"/tmp/clojure-lsp.3842339907995882215.out\"}\n"}

anonimitoraf21:03:06

There seems to be no log messages for when I start typing a search term

ericdallo21:03:20

seems correct, actually the workspaceSymbol request is to fast

ericdallo21:03:35

mine take ~30ms

anonimitoraf21:03:49

OH wait, right, I see it. This is a minimal clj sandbox though

ericdallo21:03:02

yeah, maybe is that

ericdallo21:03:16

I'll test with a local native compiled clojure-lsp, one sec

šŸ‘ 3
anonimitoraf21:03:27

No rush and thanks

ericdallo21:03:31

meanwhile, could you check the server/client json communication?

ericdallo21:03:39

you can see that with:

ericdallo21:03:08

ā€¢ set (setq lsp-log-io t) ā€¢ then lsp-workspace-show-log

šŸ‘ 3
ericdallo21:03:20

and reproduce the issue and get the log

ericdallo21:03:06

Yeah, I could reproduce the issue with the native one

ericdallo21:03:14

I'll debug more

anonimitoraf21:03:18

(It seems to not debounce, I'm seeing queries for t, tr, try, etc so I just posted the last one)

anonimitoraf21:03:51

Oh I see. Thanks. BTW, no rush or anything. It's the most minor inconvenience in the world.

šŸ‘ 3
ericdallo21:03:46

the debounce is something that lsp-mode should improve but is not the issue here

ericdallo21:03:01

thanks for finding it šŸ™‚

šŸ‘ 3
anonimitoraf21:03:29

Yes, just justifying why I included just the last workspaceSymbol query šŸ™‚

šŸ˜… 3
anonimitoraf21:03:37

Damn, so quick. Thanks!

metal 3
anonimitoraf21:03:42

Weird, which part of the code actually fixed it? the reflect config?

ericdallo21:03:45

exactly :man-shrugging:

ericdallo21:03:17

that's why I'm adding more integration tests to get those kind of bugs that only happens on native compile images

anonimitoraf07:04:48

Forgot to reply lol. I see. How did you find out that was it?

ericdallo13:04:38

Because the java object was with all fields null, then I realized it was missing that java class on the reflect config

ericdallo21:03:01

clojure-lsp Released 2021.03.30-20.42.34 ā€¢ Bump clj-kondo to 2021.03.22-20210327.192113-4 - Fixes https://github.com/clojure-lsp/clojure-lsp/issues/385 c/c @pez ā€¢ Add support for outgoing call hierarchy šŸŽ‰ - Fixes https://github.com/clojure-lsp/clojure-lsp/issues/384 ā€¢ Improve and fix missing completion item kinds (lsp-mode https://twitter.com/yonchovski/status/1376237915412574210) The outgoing call hierarchy is the inverse of the incoming call hierarchy, it show all the var usages that a the current function/var uses lazily and recursively

šŸŽ‰ 27
catjam 15