elm-format ain't deterministic for the same code with different (but valid) indentations 😭
Conversation
Why is this a bad thing? I've actually been frustrated with rustfmt for not taking into account my formatting! 😅
1
because I'm compiling svg to elm-based svg and I get a one-liner that I have to massage manually first otherwise I get an error
1
2
also, I believe those formatting tools are supposed to keep everybody's code under the same rules?
1
1
I think what I've liked is that sometimes it looks nicer to put things on one line or over multiple lines. It's nice when it takes the programmers choice into account when formatting rather than disregarding it. But I can see how that's not so great for formatting generated code.
1
1
There was an interesting post that went through of the design choices for the Ormolu Haskell formatter: tweag.io/posts/2019-05- - might explain the design choices a bit more clearly.
(it seemed quite similar to elm-format's philosophy, but more precisely expressed)
1
that's what I'd expect from elm-format:
> we concluded that if formatting is done automatically, it's better to embrace one style and avoid stylistic fragmentation. This way everyone who uses Ormolu will be automatically on the same page.
1

