This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-06-02
Channels
- # announcements (34)
- # babashka (19)
- # beginners (106)
- # calva (50)
- # cider (25)
- # clj-commons (39)
- # clj-kondo (16)
- # clojure (59)
- # clojure-czech (3)
- # clojure-europe (33)
- # clojure-norway (9)
- # clojure-seattle (1)
- # clojure-sweden (1)
- # clojure-uk (2)
- # clojured (28)
- # clojuredesign-podcast (1)
- # clojurescript (7)
- # code-reviews (19)
- # conjure (15)
- # cursive (3)
- # datomic (3)
- # emacs (21)
- # etaoin (28)
- # graphql (4)
- # introduce-yourself (1)
- # joyride (2)
- # kaocha (2)
- # london-clojurians (8)
- # lsp (24)
- # music (4)
- # nbb (4)
- # nextjournal (1)
- # off-topic (13)
- # other-languages (16)
- # remote-jobs (1)
- # rewrite-clj (6)
- # sci (1)
- # shadow-cljs (40)
- # tools-deps (15)
I’m seeing intermittent unresolved-symbol warnings (VS Code w/ Calva + LSP) like this, and I’m not clear how to get rid of them.
Related: what do I need to do to see changes to .clj-kondo/config.edn
reflected in Calva?
(short of closing and reloading the project)
Try removing .clj-kondo/.cache and reload project to see if that unresolved is fixed
I did that and even closed and reopened VSCode, and it’s still there.
I’ll hit you up in Nubank slack - it’s an internal project there.
One interesting thing: I’m seeing a mix of inline-def
errors as well
Hum, bigdec is from Clojure 1.11 right? there is a chance to be some kind of wrong clojure on classpath that clojure-lsp is passing to kondo
Possibly, but I’m also getting it for decimal?
in another spot, and now I’m seeing an inline-def
error where I was getting the unresolved-symbol
error for decimal
before ¯\(ツ)/¯.
spec.gen
is clojure.spec.gen.alpha
, which references functions from clojure.test.check.generators
. I wonder if that’s related.
Alright, I'm getting the same for decimal?
on emacs and the inline-def thing, let me debug it a little bit
for the inline-def the proper fix is to change the kondo config to:
{:lint-as {clojure.spec.gen.alpha/fmap clj-kondo.lint-as/def-catch-all}}
Why have that at all, then?
This is interesting. If I remove that config entirely, then I get unresolved-symbol
for any x in (spec.gen/fmap x)
. Configuring clojure.spec.gen.alpha/fmap
and clojure.spec.gen.alpha/gen-for-pred
to lint-as clj-kondo.lint-as/def-catch-all
solves for decimal
as well.
It'd be nice if kondo have support for that built-in, but clojure.spec.gen.alpha/fmap
defines a var it seems
Same for many functions in that namespace.
yeah, but AFAICS gen-for-pred
doesn't defines a var, it receives a pred, so that decimal?
from clojure.core should work without issues
decimal?
will only work for clj files, since this is a cljc file, kondo is complaining from the cljs side