gaborbernat,
@gaborbernat@fosstodon.org avatar

pyproject-fmt just got a new major release https://github.com/tox-dev/pyproject-fmt/releases/tag/2.0.0 now using rust under the hood (faster and more powerful)

kytta,
@kytta@fosstodon.org avatar

@gaborbernat

Quite disappointed with this change. The project was never slow to begin with, and the amount of data it has to process is so small that it’s honestly ridiculous to rewrite it into Rust.

But now that it is not pure Python any more, one can await problems that will arise when trying to run it on a non-mainstream platform. No Windows ARM, no PyPy, no musl+aarch64… The probability of having to compile it when installing is not worth it for a primarily CI-used tool.

hugovk,
@hugovk@mastodon.social avatar

@kytta @gaborbernat Do you need to run linters on a non-mainstream platform?

I run the linting on the CI in its own dedicated workflow, so it's on a vanilla Ubuntu. Then all the exotic platforms only run tests.

I prefer it this way: if the linting fails and tests pass, I know it's (usually) just an easy fixed needed. If linting is run with tests on all platforms, I don't know if a failure is from tests or linting. It's a form of "fail fast".

kytta,
@kytta@fosstodon.org avatar

@hugovk @gaborbernat yeah, maybe not CI, although I do offload some CI tasks onto an Alpine (musl) machine with ARM64, which does not have wheels in this case. But it's also a problem for developers, who might work from an ARM-based Surface and might not want to get a whole Rust compiler to just run a tool locally.

But yes, I usually don't run linters in all platforms; I'm sorry for the confusing wording ofy previous post 😅

hugovk,
@hugovk@mastodon.social avatar

@kytta @gaborbernat Looking at the main dependency, there are wheels for musl (x86-64 and i686), manylinux (x86-64, s390x, ppc64le, ARMv7l, ARM64, i686) and a couple each for Windows and macOS.

Perhaps musl + ARM64 can be added too?

https://pypi.org/project/pyproject-fmt-rust/#files

gaborbernat,
@gaborbernat@fosstodon.org avatar

@hugovk @kytta PR welcome 🤗

gaborbernat,
@gaborbernat@fosstodon.org avatar

@kytta rust is more because I liked the AST of taplo over what tomlkit was doing… not for speed at all.

You're free to keep using 1.x or add PRs to support those not widely used platforms.

cuboimposible,
@cuboimposible@fosstodon.org avatar

@gaborbernat nice! I'll see what this looks like in action on Monday when pre-commit autoupdate runs on my projects.

  • All
  • Subscribed
  • Moderated
  • Favorites
  • random
  • rosin
  • thenastyranch
  • ethstaker
  • osvaldo12
  • mdbf
  • DreamBathrooms
  • InstantRegret
  • magazineikmin
  • Youngstown
  • ngwrru68w68
  • slotface
  • GTA5RPClips
  • kavyap
  • cubers
  • JUstTest
  • everett
  • cisconetworking
  • tacticalgear
  • anitta
  • khanakhh
  • normalnudes
  • Durango
  • modclub
  • tester
  • provamag3
  • Leos
  • megavids
  • lostlight
  • All magazines