This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-11-09
Channels
- # announcements (3)
- # asami (1)
- # babashka (19)
- # beginners (84)
- # calva (3)
- # cider (5)
- # clj-commons (22)
- # clj-kondo (31)
- # cljdoc (4)
- # cljs-dev (5)
- # clojure (65)
- # clojure-australia (1)
- # clojure-europe (44)
- # clojure-nl (2)
- # clojure-uk (2)
- # clojurescript (18)
- # code-reviews (12)
- # conjure (2)
- # core-async (12)
- # data-science (1)
- # datomic (47)
- # deps-new (1)
- # emacs (2)
- # events (4)
- # fulcro (35)
- # integrant (1)
- # jobs (5)
- # jobs-discuss (10)
- # london-clojurians (1)
- # lsp (13)
- # music (1)
- # nextjournal (1)
- # off-topic (11)
- # parinfer (3)
- # pathom (6)
- # polylith (11)
- # portal (41)
- # re-frame (4)
- # reagent (13)
- # reitit (8)
- # remote-jobs (3)
- # sci (18)
- # shadow-cljs (34)
- # spacemacs (3)
- # tools-build (12)
- # tools-deps (6)
- # vim (2)
- # xtdb (7)
is there a way to exclude an unused binding by name, regardless of ns (typically "this")
@mpenet currently not. this is all the config that is possible currently: https://github.com/clj-kondo/clj-kondo/blob/master/doc/linters.md#unused-binding If this is important for passing CI or git post-commit hooks, then you can turn that linter off for now perhaps using an extra configuration that you don't use in your editor. Feel free to create an issue about this.
Hey, I sometimes switch branches. Some namespace api changes and even after having evaled calling site as well as the changed ns, I am still stuck with unresolved var
or some changed arity issue. I am using your flycheck integration. Is this a known issue?
the easiest way to deal with this is to delete the .clj-kondo/.cache
directory
You could configure magit to do that automatically on checkout
Perhaps clojure-lsp will also fix that automatically by reindexing changed files (cc @ericdallo)
this is a known bug on clojure-lsp side, we are currently ignoring didChangeWatchedFiles
notifications from client which happens when user change the files outside the editor (using git for example)
@borkdude that's related with my clj-kondo feature request of allowing to pass multiple input texts during lint I mentioned some weeks ago, I need to open the issue yet 😔
from out DM: I found something to improve clojure-lsp performance during content changes that should fix some issues and I'd like to include not on the release of this week but on the next, but I found I can't make it work with current clj-kondo api the issue is that ATM clojure-lsp calls clj-kondo in 2 possible ways: • when analyzing external classpath or project sourcepaths, calling clj-kondo to scan a list of filenames • when any code is changed, calling clj-kondo with `:lint ["-"]` passing the buffer text as stdin I'm refactoring and improving the later, if someone change a git branch, or for some reason change multiple files multiple times, clojure-lsp call N times clj-kondo, making cpu go crazy obviously, I made some changes that will debounce and group these changes in a single clj-kondo call, but then I just found there is no way to pass multiple "texts" to clj-kondo 😅 I'd need something like:
:filenames ["a.clj", "b.clj" "c.clj"]
:lint ["text a", "text b", "text c"]
or wherever api you think it'd be the best, WDYT? Does that makes sense for you?
borkdude
can you explain why you need to pass code + file names which aren't actually files?
ericdallo [9:43 AM]
Because the code is not necessarily saved on disk, so we have only the text code and we need to know which URI that text was related
borkdude [9:43 AM]
but where does this code come from? I don't understand the use case and would like to know more about it
ericdallo [9:44 AM]
It's the code from the editor that was changed for example because of a git branch change
borkdude [9:45 AM]
but why can't you just pass the changed file names in this case?
ericdallo [9:46 AM]
Because they are not necessarily persisted on disk :/
[9:46 AM] They could be only on user buffer
borkdude [9:46 AM]
I see yeah
[9:47 AM] ok, can you make an issue? I'll think a little bit more about this. Is this blocking you?