Fork me on GitHub
#graalvm
<
2022-11-04
>
mpenet14:11:03

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

borkdude14:11:27

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

mpenet14:11:37

there's just an alias to do it

mpenet14:11:40

it's easy to do

borkdude14:11:49

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

mpenet14:11:52

but that would be handry to have prebuilt binaries

mpenet14:11:02

yeah I know

mpenet14:11:14

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

mpenet14:11:31

didn't check, but it's an impression

borkdude14:11:49

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

mpenet14:11:04

if it's not I ll go with that

borkdude14:11:32

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

mpenet14:11:51

I think it does run analysis indeed

borkdude14:11:59

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

ericdallo14:11:08

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

ericdallo14:11:55

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

ericdallo14:11:59

same for clojure-lsp clean-ns

ericdallo14:11:58

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

mpenet14:11:03

interesting

mpenet14:11:04

but there's no warn task tho

mpenet14:11:15

or I missed it

mpenet14:11:25

it's basically the equivalent of cljfmt fix

mpenet14:11:07

thanks

👍 2
ericdallo14:11:44

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

mpenet14:11:55

what do you mean?

mpenet14:11:10

it's for CI, against repo source

mpenet14:11:21

nothing really fancy

mpenet14:11:37

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

mpenet14:11:47

and let consumers use it if they want

ericdallo14:11:22

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

mpenet14:11:08

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

mpenet14:11:12

we do lein cljfmt now

mpenet14:11:19

and people complain that it's slow

mpenet14:11:33

mostly caused by lein

ericdallo14:11:56

yeah, native binary should help

ericdallo14:11:20

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

mpenet14:11:56

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 !

ericdallo14:11:01

Usually graal image means faster startup, and resource consumption

ericdallo14:11:12

Yeah, I know that feel

lukasz15:11:22

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

gotta_go_fast 2