There was recently this article about Linus Torvalds’ issues with rustfmt, which prompted others to voice their agreement with his sentiment online.

Yesterday someone pointed out how rustfmt is effectively unmaintained with basically no activity on the repository for months.

The contributors graph shows a similar story - there is essentially no development happening on rustfmt, it seems.

    • A lot of what Linus complained about is 100% valid though

      Not necessarily. The program can be configured and they did not create a default configuration for all, to enforce a specific style. Linus can complain about the default settings, but that does not make sense if we look at all other tooling used in Linux. Are they using every application with default settings and then complain about it?

      No, there are settings adapted for the Kernel and their workflow. And they did not do that with rustfmt. While the critique about the issue itself is valid, its not valid to complain about it about the program. He should have complained about those responsible for the default configuration in Linux.

      • brian ( brian@programming.dev ) 
        link
        fedilink
        arrow-up
        2
        ·
        1 year ago

        I do think they should have taken an approach similar to prettier and gofmt. very minimal settings and opinionated so all js/go codebases are effectively the same formatting

                • Ahh, I see. Well okay, you don’t have to like it. But that is not the problem of the default configuration, but the problem of those who accept it as the formatting in the project. You don’t like what the KDE code formatting project does, and that’s the issue. Working in teams it will obviously happen at some point that you don’t like what the team accepted as formatting. This is not a specific issue with KDE or rustfmt.

                  BTW, wouldn’t it work to have your personal rustfmt configuration that you like and work with and when you are done and want to git push, it would automatically reformat with rustfmt using the teams formatting? I personally don’t work in teams, so no idea if this is a viable option to do if you really dislike what they use.

  • balsoft ( balsoft@lemmy.ml ) 
    link
    fedilink
    arrow-up
    18
    ·
    1 year ago

    TBH for personal projects it’s almost perfect already. It produces consistent readable code. But yeah it’s often not very “mergeable”, which is much more important for massive projects with thousands of active committers.

  • Kissaki ( Kissaki@programming.dev ) 
    link
    fedilink
    English
    arrow-up
    3
    ·
    1 year ago

    https://doc.rust-lang.org/style-guide/index.html#small-items

    We leave it to individual tools to decide on exactly what small means. In particular, tools are free to use different definitions in different circumstances.

    What does this mean?

    What does Linus when he says rustfmtcheck? cargo fmt check? A util I can’t find with a simple search? Maybe they have makefile targets or sth for it?

    The concerns raised by Linus make sense to me, but should be simple to solve. The small items description already mentions variance, and the need for tools to decide. So shouldn’t it be a simple configuration change?