This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-02-14
Channels
- # announcements (11)
- # babashka (82)
- # beginners (51)
- # calva (11)
- # cider (3)
- # clj-kondo (62)
- # cljdoc (10)
- # cljs-dev (22)
- # clojure (75)
- # clojure-boston (1)
- # clojure-brasil (3)
- # clojure-czech (4)
- # clojure-europe (49)
- # clojure-france (10)
- # clojure-italy (16)
- # clojure-nl (5)
- # clojure-uk (9)
- # clojurescript (69)
- # community-development (33)
- # conjure (12)
- # core-async (6)
- # cursive (2)
- # datalevin (7)
- # datomic (6)
- # graalvm (13)
- # gratitude (2)
- # honeysql (3)
- # introduce-yourself (1)
- # lsp (37)
- # nextjournal (62)
- # off-topic (29)
- # pathom (1)
- # quil (2)
- # reitit (4)
- # releases (2)
- # sci (1)
- # shadow-cljs (28)
- # spacemacs (10)
- # sql (1)
- # tools-build (3)
- # vim (3)
Hi, I experience a unresolved var
on this line containing this p/->
macro despite the fact that I added promesa.core/-> clojure.core/->
in clj-kondo config:
https://github.com/babashka/nbb/blob/main/examples/node-fetch/example.cljs#L20
Any idea?
@admin055 you need to upgrade promesa in the deps.edn of your project, if you have any, since that's where clj-kondo will get the info from
Yes the second one...in the nbb repo so deps.edn already contains the last promesa version.
Emacs + LSP but I get the same warning when launching in CLI:
mike@prestancedesign /t/nbb (upd-node-fetch-example)> clj-kondo --lint examples/node-fetch/
examples/node-fetch/example.cljs:20:18: warning: Unresolved var: p/->
linting took 143ms, errors: 0, warnings: 1
Already tested without success, I retry tho.
Thanks.
lsp will always align to messages obtained by clj-kondo on the command line, right?
lsp might be using a slightly older or newer version than you have on the clj-kondo, but in 99% of the cases yes.
Hmm, removing .clj-kondo/.cache
and then doing lsp-workspace-restart
fixed it for me
Hmm, this is weird, when I do a manual:
$ clj-kondo --lint $(clojure -Spath) --dependencies
Downloading: funcool/promesa/6.1.434/promesa-6.1.434.pom from clojars
Downloading: funcool/promesa/6.1.434/promesa-6.1.434.jar from clojars
then it downloads promesa newer for the first time. I don't know what lsp was analyzing here ...
After delete the cache folder, it's solved. 👍
@UKFSJSM38 this is a mystery to me. could you try this one the nbb project when you have time?
@admin055 yeah, but you probably have the same problem as I have here: > but then again, now it doesn't report any unresolved var when I type a wrong one
No it works for me.
oh sorry, misreading 🙂
Yes indeed, I experience the same bug.
Directly with CLI clj-kondo too.
because you haven't linted deps, that's expected. but normally lsp takes care of that
after deleting .lsp/.cache
and .clj-kondo/.cache
and then an lsp-workspace-restart
it started working again for me
> because you haven't linted deps, that's expected. but normally lsp takes care of that
OK understand. That's why you use clj-kondo --lint $(clojure -Spath) --dependencies
before
Interesting...
There is a bug on latest release regarding classpath cache, not sure it's the problem here, but it may worth try the latest master build from #clojure-lsp-builds
Perfect, thanks for the information. Will try later. 👍
Big refactors are sometimes worth it but can also be risky. That's why I hope y'all will try out babashka master before release 😰
Hahha yeah, one of the reasons I created #clojure-lsp-builds as well I'm trying to avoid big refractors as well, but that one was on backlog for some months already
#babashka-circleci-builds <--
$ bash <(curl ) --version 0.7.5-SNAPSHOT --dir .
$ ./bb
Thanks both for the support!
are there strong feelings on naming conventions for hook namespaces? I see a few options around, and want to make sure I am properly namespacing here
hooks.sicmutils.namespace-where-the-macro-lives
seems like a nice option
as long as the namespace name is unique and starts with or contains your org / lib name to avoid conflicts, it should be good
nice, I went with the convention above, thanks!
this seems to work, for linting multiple directories - clj-kondo --lint src --lint test
. is this the recommended way?
I’m setting up a Github Action with https://rymndhng.github.io/2020/04/03/Integrate-clj-kondo-with-Github-Actions/…
@sritchie09 You can do it like this as well: --lint src:test
(classpath style, on Windows, use semicolon as path delimiter), or even --lint src test
nice. I am going to make CI fail on warnings, hardcore lifestyle
awesome!!
Oh boy, good point, maybe it's time to relax. If golang becomes my jam I'm switching fields… Recent conversion has my zeal fired up high
I’m all for failing in unused vars