Summary -- While looking at #28887, I noticed a repeated ecosystem check failure caused by a git error: > Failed to commit: fatal: failed to encode 'tests/roots/test-root/wrongenc.inc' from iso-8859 to UTF-8 This is caused by a known upstream bug (sphinx-doc/sphinx#14364) with an open PR (sphinx-doc/sphinx#14467), but the PR is waiting for the next release milestone, I think, so it seemed easiest just to temporarily remove the project to unblock CI checks. Test Plan -- CI on this PR
ruff-ecosystem
Compare lint and format results for two different ruff versions (e.g. main and a PR) on real world projects.
Installation
From the Ruff project root, install with uv:
uv tool install -e ./python/ruff-ecosystem
Usage
ruff-ecosystem <check | format> <baseline executable> <comparison executable>
Note executable paths may be absolute, relative to the current working directory, or will be looked up in the current Python environment and PATH.
Run ruff check ecosystem checks comparing your debug build to your system Ruff:
ruff-ecosystem check ruff "./target/debug/ruff"
Run ruff format ecosystem checks comparing your debug build to your system Ruff:
ruff-ecosystem format ruff "./target/debug/ruff"
Run ruff format ecosystem checks comparing with changes to code that is already formatted:
ruff-ecosystem format ruff "./target/debug/ruff" --format-comparison ruff-then-ruff
Run ruff format ecosystem checks comparing with the Black formatter:
ruff-ecosystem format black ruff -v --cache python/checkouts --format-comparison black-and-ruff
The default output format is markdown, which includes nice summaries of the changes. You can use --output-format json to display the raw data — this is
particularly useful when making changes to the ecosystem checks.
Development
When developing, it can be useful to set the --pdb flag to drop into a debugger on failure:
ruff-ecosystem check ruff "./target/debug/ruff" --pdb
You can also provide a path to cache checkouts to speed up repeated runs:
ruff-ecosystem check ruff "./target/debug/ruff" --cache ./repos