clj-kondo

borkdude 2024-08-06T09:07:35.976089Z

Is anyone in desperate need for the new clojure 1.12 array syntax to be supported in clj-kondo? I kinda forgot about in the last release, but willing to do another one with that fix. Any other clojure 1.12 stuff? Let me know in 🧡

deep-symmetry 2024-08-18T18:35:47.522949Z

I suppose I could, uninstall the homebrew version in the interim, and then reinstall it after the release. I’ll explore that next time I would like to work on updating my Java interop.

borkdude 2024-08-18T18:39:13.730349Z

I'll give you a link if you say what OS you are using. You could just temporary change your .el file to use the bleeding edge clj-kondo as well

borkdude 2024-08-18T18:40:15.623349Z

or we could even make this configurable, but you can tweak it here: https://github.com/borkdude/flycheck-clj-kondo/blob/e38c67ba9db1ea1cbe1b61ab39b506c05efdcdbf/flycheck-clj-kondo.el#L64

deep-symmetry 2024-08-18T18:41:00.459869Z

I’m not sure the .el file uses it directly, since I am using it via flycheck integration. It would probably be easier for me to just try swapping out the binary. I’m using macOS on Apple Silicon. Ah! I retract my concern, since you are referring to precisely the integration that I am using. πŸ˜„

deep-symmetry 2024-08-18T18:41:31.210259Z

Sure, I can give this a try today to help test the work you’ve done already.

borkdude 2024-08-18T18:42:48.666979Z

ok, you can download the binary from artifacts here: https://cirrus-ci.com/task/5069331787153408 make sure to remove some security flags that macOS adds while downloading it with sudo xattr -c <the-binary>

deep-symmetry 2024-08-18T19:56:49.458279Z

Good news, this resolved the issues, and I can proceed with improving my Java interop whenever I have time to get back to it!

borkdude 2024-08-18T20:44:45.893789Z

Thanks for testing!

exitsandman 2024-08-06T11:06:38.068559Z

I don't really desperately need it, but it's definitely something I'm looking forward to.

πŸ‘ 1
borkdude 2024-08-06T15:40:06.193869Z

Here's the PR: https://github.com/clj-kondo/clj-kondo/pull/2367/files

seancorfield 2024-08-06T16:25:36.733699Z

We're using 1.12 in production, and we use clj-kondo in dev (via LSP). We are not using the array type syntax (yet), but we are using the method value stuff. I don't think we have any non-dev code that has needed to use param-tags yet (surprisingly, perhaps?).

borkdude 2024-08-06T17:05:01.316809Z

ah gotcha

borkdude 2024-08-06T17:06:02.820559Z

I also updated edamame, which polylith is using, so at least you can parse byte/1 with that now, without an exception, FWIW

πŸ‘πŸ» 1
seancorfield 2024-08-06T17:38:14.649199Z

Well, once Polylith updates its deps πŸ™‚

deep-symmetry 2024-08-17T23:10:36.209699Z

I just joined this channel because I set up a branch of Beat Link Trigger, my integration environment for DJ shows, to start taking advantage of the Java interop improvements in Clojure 1.12 now that it is at release candidate status, and the very first thing that happened was that when I tried to change a type hint for a java.nio.file method to use the new array syntax, clj-kondo flagged it as an invalid symbol and lit up with 30 other spurious errors throughout the namespace. laughcry I noticed that there had been a change to support this right about the time of the last release but that it seemed to not make it in, so I was curious when it might get released. I am glad to see that question is at least on the radar. This is a forward-looking task for me, though, I can just hold off on it until clj-kondo is ready. After all, Clojure 1.12 is not even officially released yet.

seancorfield 2024-08-17T23:19:48.917579Z

> clj-kondo flagged it as an invalid symbol and lit up with 30 other spurious errors How are you running clj-kondo?

deep-symmetry 2024-08-17T23:21:22.821649Z

Via flycheck within GNU Emacs.

deep-symmetry 2024-08-17T23:21:56.212099Z

Or if you mean how I am installing it, homebrew?

seancorfield 2024-08-17T23:23:14.124299Z

The most recent release appears to be 2024-08-01 which is before this PR was merged, so you'd need to be using the snapshot / nightly build to pick up this change...

deep-symmetry 2024-08-17T23:24:37.274719Z

Yes, that’s how it looked for me, hence my interest in when it will be in an actual release. I’d sooner wait for that than figure out how to use unreleased builds.

seancorfield 2024-08-17T23:26:42.648679Z

Looks like the PR hasn't even made it into the "unreleased" changelog section yet: https://github.com/clj-kondo/clj-kondo/blob/master/CHANGELOG.md

deep-symmetry 2024-08-17T23:28:12.325629Z

Ah, interesting! I looked around a bit for that but somehow missed it. Anyway, I have set aside my clojure-12 branch for now, it’s not like I lack plenty of other things I could be working on. πŸ™‚

deep-symmetry 2024-08-17T23:28:41.909329Z

But I’ll keep an eye out for this so it can unblock that work.

borkdude 2024-08-18T06:18:05.433829Z

I’ll update the changelogs before the release. You could perhaps download a binary from the CI builds to pre-test

πŸ‘ 1
borkdude 2024-08-07T07:57:21.578429Z

merged the PR

borkdude 2024-08-29T16:01:45.358489Z

Now released (cc @mike1452)

mike_ananev 2024-08-29T17:04:41.813819Z

@borkdude Thank you! πŸ‘

deep-symmetry 2024-08-30T03:08:43.427119Z

Yes, thanks, updated and got rid of my temporary intermediate build! πŸ˜„

Kirill Chernyshov 2024-08-06T11:14:46.250039Z

Would it be possible to enable something like "redundant ignore" warning? in case a form was marked with :clj-kondo/ignore metadata but due to changes in underlying lib or config does not produce any error or warning any more.

borkdude 2024-08-08T08:46:51.581119Z

One detail that needs to be taken care of: what if you don't want to use :redundant-ignore in some places... :)

borkdude 2024-08-08T08:48:23.843099Z

Currently I'm thinking about the following scenario: - The :redundant-ignore is always reported at level :info, thus not breaking any CI runs - You could optionally enable this linter just to scan for redundant ignores as a one off task

borkdude 2024-08-06T11:15:36.470019Z

hehe that's clever

borkdude 2024-08-06T11:16:13.345969Z

I think that can be done, but this will then still trigger CI to fail etc when clj-kondo changes, which is maybe against the spirit of clj-kondo/ignore?

Kirill Chernyshov 2024-08-06T11:18:45.919039Z

right... maybe then as a cli option or config entry... let me think more about this πŸ™‚

borkdude 2024-08-06T11:24:44.931259Z

well, you can always add an extra config on the command line with that one enabled I guess, or it can be reported as level :info

Kirill Chernyshov 2024-08-06T11:27:38.183709Z

for sure it should be :info. It is not something that by default must break on CI

borkdude 2024-08-06T11:52:41.373879Z

ok, seems like a fun idea. please post an issue

Kirill Chernyshov 2024-08-06T12:08:54.127609Z

https://github.com/clj-kondo/clj-kondo/issues/2366

Kirill Chernyshov 2024-08-06T12:08:55.875929Z

done

borkdude 2024-08-07T18:26:04.645659Z

I've got a working prototype in the redundant-ignore branch:

πŸ‘ 6
2024-08-07T18:48:10.378029Z

this is killer

borkdude 2024-08-07T18:51:22.912709Z

if you want to test it, the :git/sha is 6a97ffcd80e599d39edfe7fde5ec1686f2b3cbc1 :)

Alex Miller (Clojure team) 2024-08-06T19:00:10.319729Z

I'm at JVM Language Summit right now, hearing a pres about google's annotations that check whether the caller must or may not use the return value of a method to detect bugs. this is less of an issue in Clojure b/c we don't have void methods and everything is an expression. but I wonder if there is some utility in checking for the same kind of thing for non-side-effecting (where you almost certainly should use the return) vs side-effecting fns (where it might be ok not to). I presume some of this is already covered in kondo but I wasn't sure what

Alex Miller (Clojure team) 2024-08-06T19:00:52.217959Z

just sharing in case that yields any new ideas

2024-08-06T19:04:13.929699Z

indeed it is! https://github.com/clj-kondo/clj-kondo/blob/master/doc/linters.md#unused-value

πŸŽ‰ 3