clj-kondo 2026-07-31

@jonurnieta Thanks for working on a PR and commits for those. Looks like the CircleCI check on the PR only failed due to a bad GraalVM-related download, so it should succeed on a re-run? /cc @borkdude

I'll take a look at this soon

No worries, it's Friday...

I'm busy getting another project out today. I thought I was finishing it this morning but it took all day

I think I found an issue with the new type inference, or else I'm misunderstanding something. I've reduced it to this example:

(ns kondo)

(defn bounds [grid]
  (let [active-cells (keep (fn [[pos v]] (when v pos)) grid)
        xs (map first active-cells)
        ys (map second active-cells)]
    {:x [(apply min xs) (apply max xs)]
     :y [(apply min ys) (apply max ys)]}))

(defn place []
  (let [grid (into {} (for [x (range 3) y (range 3)]
                        [[x y] 0]))
        {[x0 x1] :x [y0 y1] :y} (bounds grid)]
    (+ (- x1 x0) (- y1 y0))))
which the latest release of kondo reports as:
$ clojure -M:clj-kondo --parallel --lint kondo.cljs
kondo.cljs:14:22: error: Expected: number, received: vector.
kondo.cljs:14:25: error: Expected: number, received: vector.
kondo.cljs:14:32: error: Expected: number, received: vector.
kondo.cljs:14:35: error: Expected: number, received: vector.
linting took 81ms, errors: 4, warnings: 0
I can fix it by making the map in bounds return a map of x0,x1,y0,y1 instead of the nested range vectors, but I'm not quite following what the type error is here, given that the let in place destructures the inner vectors? Happy to submit this as an issue but thought I would inquire here first to see if I was missing something. Thanks for tightening this up though, I did find a couple unexpected bugs in other places using this linter, so it's definitely an improvement, just not sure on this case.

Probably a bug. GitHub issue welcome

Cool, was going to add an issue today but glad to see it's already setup! Also apologies I didn't simplify it down to that simple example, that makes it much easier to see the issue. Thank you!