lsp

:clojure-lsp: Clojure implementation of the Language Server Protocol: https://clojure-lsp.io/
Sigve 2021-06-29T07:47:56.252400Z

Upgrading to the latest version from 2021.02.26-13.58.48 seems to break the ignore-classpath-directoriesfeature in clojurescript. For example finding references to functions now also returns results from my targetdirectory

Sigve 2021-06-30T07:33:56.253900Z

The problem seems to have been solved by removing the .lsp folder for the project

ericdallo 2021-06-30T12:26:27.254100Z

:thinking_face:

Sigve 2021-07-02T07:40:36.269600Z

Hmm, this problem reappears in my huge production repo. But i cannot seem to reproduce it in a small example repo. Anything else i could do to provide some information?

ericdallo 2021-07-02T12:28:15.272700Z

Hum, could you try removing .clj-kondo/.cache and .lsp/sqlite.db?

ericdallo 2021-07-02T12:28:36.272900Z

A repro would be perfect, but not sure if that is possible for you

Sigve 2021-07-05T13:39:32.294500Z

Sorry but i'm not able to reproduce it.. cleaning the cache and db does not seem to work. However adding source-paths explicitly, seems to solve the problem - while this was not necessary to not include the targetdirectory in the 2021.02.26-13.58.48 version. Mabye something was changed related to this

ericdallo 2021-07-05T13:46:53.294800Z

We improved the way we scan for source-paths, with this changed you don't need to include source-paths for most projects, but we didn't change anything related with the ignore-classpath-directories

Sigve 2021-07-05T14:02:08.295Z

Now i finally noticed that my project actually includes the target dir in :paths. clojure-lsp using this setting seems to have been added after the February edition i was using previously, so it makes sense now

Sigve 2021-07-05T14:21:30.295300Z

Figwheel seems to require that the "target" directory is on the classpath:

[Figwheel:WARNING] Attempting to dynamically add "target" to classpath!
[Figwheel:WARNING] Target directory "target" is not on the classpath
[Figwheel:WARNING] Please fix this by adding "target" to your classpath
 I.E.
 For Clojure CLI Tools in your deps.edn file:
    ensure "target" is in your :paths key
so other clojurescript users might run into this problem

ericdallo 2021-07-05T14:22:04.295500Z

oh, yeah, that makes sense now

ericdallo 2021-07-05T14:22:22.295700Z

we had a update where clojure-lsp resolve the source-paths checking the deps.edn

ericdallo 2021-07-05T14:22:52.295900Z

anyway, I think this is correct, right?

Sigve 2021-07-05T14:24:18.296100Z

Yes it makes sense, it is just a gotcha when using clojurescript. Including the target directory will mess up finding references to and from functions since they are duplicated there

ericdallo 2021-07-05T14:25:11.296300Z

hum, it'd be good to fix that somehow

ericdallo 2021-07-05T14:25:13.296500Z

just not sure how

ericdallo 2021-07-05T14:26:04.296700Z

maybe ignore-classpath-directories could be the truth even if the directory is on source-paths?

ericdallo 2021-07-05T14:26:28.296900Z

this way user could have the target on classpath, and tell clojure-lsp to really ignore the target

Sigve 2021-07-05T14:33:12.297100Z

If that is possible it would be good yes

ericdallo 2021-07-05T14:33:32.297300Z

yeah, I'll take a look if that is possible

🎉 1
borkdude 2021-06-29T08:08:41.252700Z

I have a similar issue where I see results from .emacs.d/....

ericdallo 2021-06-29T12:59:10.253Z

I can take a look soon, Do you have a sample repro ?

Sigve 2021-06-29T14:29:30.253300Z

I cant seem to reproduce it in a smaller repo.. i have to investigate further

ericdallo 2021-06-29T14:30:27.253500Z

Hum, this doesn't happen on deps.edn clojurescript projects?