Fork me on GitHub

Hi everybody, this might have been asked already, but why is this a linting error (using specter ). Did anybody run into this already?

Joshua Suskalo16:08:35

What's the warning?

Joshua Suskalo16:08:55

I might've just missed a couple things in my specter config that I added to the readme.


it's unresolved symbol

Joshua Suskalo16:08:34

alright, I'll take a look at it

Joshua Suskalo16:08:45

Do you have the config from specter's readme already in your project?

☝️ 3

not yet, let me check that


@U5NCUG8NR is it the clj-kondo readme?


Oh cool, no I definitely haven't seen that

Joshua Suskalo16:08:46

Yeah, that will fix a lot (if not all) of your unresolved symbol errors.


uhm it seems like they are still there


wait, blowing the cache might have solved it

Joshua Suskalo17:08:09

Yeah, you have to blow the cache and run clj-kondo --dependencies --lint "$(clojure -Spath)" when you do stuff like this.

👍 5

It would be cool if specter could include this in its lib, but I guess README would do


yeah I was thinking the same

Joshua Suskalo17:08:28

Yeah I asked nathan and the preference was to not include it in the artifact since not everyone uses kondo and it would increase the artifact size, even if only slightly.

Joshua Suskalo17:08:51

I would be happy to PR this into the clj-kondo/config repo though.


@U5NCUG8NR I think we also have some instances of sp/richnav like:

(def ^:private terminal2
  (sp/richnav [afn]
              (sp/select* [_this _vals _structure _next-fn]
                          (throw (Exception. "'terminal2' should only be used in multi-transform")))
              (sp/transform* [_this vals structure _next-fn] (afn vals structure))))


yearh clj-kondo/config would be ok too. I think Nathan wasn't using clj-kondo at the time, but now he is, so perhaps his opinion has changed


but clj-kondo/config is always an option

Joshua Suskalo17:08:03

I could run it by him again at some point.

Joshua Suskalo17:08:06

Also @U0C8489U6 that's kinda out of scope for the minor config that I was making. That config is just meant to allow you to use all the vars from inside specter without them showing up as undefined. It's not meant to give you reasonable semantics for writing your own navs.


I think I will just disable linting for that then for now

Joshua Suskalo17:08:52

Although if nathan is interested in adding clj-kondo support to specter, I could consider writing hooks for the macros which would support custom navigators past not showing up as undeclared.

Joshua Suskalo17:08:37

Which even if he isn't interested, that'd be a significant effort, so I'd want to at least pull it on clj-kondo/config

👍 3

Thank you for your work on that Joshua, it really helped here