graalvm

mpenet 2022-11-04T14:27:03.974719Z

I am curious: nobody distributes natively compiled binaries for cljfmt already?

borkdude 2022-11-04T14:27:27.717409Z

I think cljfmt has their own, but not really maintained?

mpenet 2022-11-04T14:27:37.344379Z

there's just an alias to do it

mpenet 2022-11-04T14:27:40.095729Z

it's easy to do

borkdude 2022-11-04T14:27:49.211379Z

clojure-lsp packages cljfmt too AFAIK and you can use that from the command line

mpenet 2022-11-04T14:27:52.905299Z

but that would be handry to have prebuilt binaries

mpenet 2022-11-04T14:28:02.620209Z

yeah I know

mpenet 2022-11-04T14:28:14.081909Z

but it's a tad slower for CI use I think

mpenet 2022-11-04T14:28:31.062259Z

didn't check, but it's an impression

borkdude 2022-11-04T14:28:49.100219Z

pinging @ericdallo - I don't think it should have to be slower

mpenet 2022-11-04T14:29:04.998609Z

if it's not I ll go with that

borkdude 2022-11-04T14:29:32.527229Z

there were some issues before that it wanted to analyze your whole project before it did anything, but I think they might be addressed now

mpenet 2022-11-04T14:29:51.859969Z

I think it does run analysis indeed

borkdude 2022-11-04T14:29:59.253119Z

then again, I'm not using it in this way myself, so grain of salt

ericdallo 2022-11-04T14:32:08.449659Z

We use for all nubank services as official linter on CI, it's pretty fast even on medium/big projects

ericdallo 2022-11-04T14:32:55.557459Z

and for clojure-lsp format we don't check external dependencies, so it's even faster than running clojure-lsp diagnostics .

ericdallo 2022-11-04T14:32:59.449329Z

same for clojure-lsp clean-ns

borkdude 2022-11-04T14:33:07.977549Z

cool

ericdallo 2022-11-04T14:33:58.591859Z

Consistency is important too (rely on classpath, project settings etc), than you manually pass folders to it

mpenet 2022-11-04T14:34:03.601229Z

interesting

ericdallo 2022-11-04T14:34:27.894669Z

https://clojure-lsp.io/api/

mpenet 2022-11-04T14:36:04.986319Z

but there's no warn task tho

mpenet 2022-11-04T14:36:15.498989Z

or I missed it

mpenet 2022-11-04T14:36:25.941999Z

it's basically the equivalent of cljfmt fix

ericdallo 2022-11-04T14:37:32.385529Z

yes, --dry

mpenet 2022-11-04T14:37:49.578549Z

oh!

mpenet 2022-11-04T14:38:07.675339Z

thanks

👍 2
ericdallo 2022-11-04T14:38:44.755379Z

Out of curiosity, do you intend to use on deps.edn, native cli, or with lein?

mpenet 2022-11-04T14:41:55.491599Z

what do you mean?

mpenet 2022-11-04T14:42:10.678919Z

it's for CI, against repo source

mpenet 2022-11-04T14:42:21.307609Z

nothing really fancy

mpenet 2022-11-04T14:42:37.835319Z

I ll just add the clojure-lsp binary to our docker image used to run most clj jobs

mpenet 2022-11-04T14:42:47.435969Z

and let consumers use it if they want

ericdallo 2022-11-04T14:42:56.953969Z

👍

ericdallo 2022-11-04T14:43:22.839029Z

We use at Nubank via lein-clojure-lsp, this way lein lint works on both local and CI and users don't need clojure-lsp installed locally for intellij Users for example

mpenet 2022-11-04T14:44:08.489099Z

I am not sure I want lein startup time in the mix

mpenet 2022-11-04T14:44:12.974539Z

we do lein cljfmt now

mpenet 2022-11-04T14:44:19.907239Z

and people complain that it's slow

mpenet 2022-11-04T14:44:33.924409Z

mostly caused by lein

ericdallo 2022-11-04T14:44:56.144289Z

yeah, native binary should help

ericdallo 2022-11-04T14:45:20.711179Z

but I don't think it will be that fast as in the end formatting whole project code is not that fast as it delegates to cljfmt in the end

mpenet 2022-11-04T14:45:56.311129Z

personally I don't care so much, it does that via lsp on-save-hook locally but we have some people who still don't use lsp !

ericdallo 2022-11-04T14:46:01.917509Z

Usually graal image means faster startup, and resource consumption

ericdallo 2022-11-04T14:46:12.685839Z

Yeah, I know that feel

lukasz 2022-11-04T15:42:22.844159Z

cljstyle is a fork of cljfmt that's distributed as a single binary: https://github.com/greglook/cljstyle

2