Upgrading to the latest version from 2021.02.26-13.58.48
seems to break the ignore-classpath-directories
feature in clojurescript. For example finding references to functions now also returns results from my target
directory
The problem seems to have been solved by removing the .lsp
folder for the project
:thinking_face:
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?
Hum, could you try removing .clj-kondo/.cache and .lsp/sqlite.db?
A repro would be perfect, but not sure if that is possible for you
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 target
directory in the 2021.02.26-13.58.48
version.
Mabye something was changed related to this
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
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
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 problemoh, yeah, that makes sense now
we had a update where clojure-lsp resolve the source-paths checking the deps.edn
anyway, I think this is correct, right?
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
hum, it'd be good to fix that somehow
just not sure how
maybe ignore-classpath-directories
could be the truth even if the directory is on source-paths?
this way user could have the target on classpath, and tell clojure-lsp to really ignore the target
If that is possible it would be good yes
yeah, I'll take a look if that is possible
I have a similar issue where I see results from .emacs.d/....
I can take a look soon, Do you have a sample repro ?
I cant seem to reproduce it in a smaller repo.. i have to investigate further
Hum, this doesn't happen on deps.edn clojurescript projects?