Fork me on GitHub
#lsp
<
2023-12-05
>
Joe Douglas16:12:07

Hi, I'm getting an issue when doing jump to definition/call hierarchy. Sometimes I get directed to an identical version of the namespace under target/classes . I haven't been able to isolate when it happens with Jump to definition, but each node in the call hierarchy is duplicated - one result for the namespace itself, one result for the same namespace under target/classes . The target/classes directory and namespaces within it don't exist most of the time, it's only when I navigate to such a namespace that the file gets created. As soon as I navigate away it disappears. I'm using VsCode, and lein, this has been happening for at least the past year. The project is from my work so I can't really post details about it. I haven't been able to reproduce this in another project. I searched for this issue in this channel and found https://clojurians.slack.com/archives/CPABC1H61/p1660633630977769, but it hasn't gotten me any closer to what's going on. Let me know what information you need to diagnose further.

1
ericdallo17:12:18

@USRHVLXTQ I fixed this some times with extra settings like source-paths-ignore-regex but it should works out of the box for target/classes , if not could you provide a repro? some kind of public repo would help a lot understand the problem if I can repro it

Joe Douglas21:12:14

Thanks for getting back to me

Joe Douglas21:12:41

I've tried source-paths-ignore-regex but it didn't work for me

Joe Douglas21:12:40

I can maybe try and reproduce it, but I don't have high hopes. This is a big project with a lot of cruft, so there's a lot of potential things that could be causing it

Joe Douglas23:12:11

@UKFSJSM38 I had the idea that I might run the lsp in debug mode against my project so I could repl into it and dig more into where the phantom results are coming from, but when I tried following the instructions for development in your documentation the server just hanged. Do you know if it's possible to do this?

Joe Douglas23:12:29

(I have tried reproducing it in another project, but no luck so far)