Repository navigation
Description
Problem
Citry vendors Ruff 0.16.6 at commit
22f65a2ab5052990503985c7c794de37598d531e as the complete
third_party/rust/ruff git submodule so the template formatter can parse,
format, and compare embedded Python expressions in-process. The workspace
declares 16 ruff_* crates plus ty_static by local path. The formatter
directly imports five, and Cargo resolves the rest of the dependency closure.
This makes Ruff a large repository-level dependency and requires Citry to
follow Ruff's workspace toolchain and internal crate changes. The current
third-party dependency note says a Cargo git dependency previously failed,
but it does not record the attempted dependency shape or show whether the
obstacle still exists.
Goal
Remove third_party/rust/ruff while preserving the current in-process
formatting behavior, reproducible builds, and semantic verification.
Investigation
- Reduce Citry's actual use to the smallest required Ruff API and crate closure.
- Reproduce and document why pinned Cargo git dependencies do or do not work with the current Ruff workspace.
- Check whether the required crates are now published independently or whether Ruff offers a supported library API for parsing and formatting Python expressions.
- Identify the smallest upstream change that would unblock Citry: published crates, a supported facade crate, feature separation, or another stable embedding boundary.
- Open focused Ruff upstream issues or pull requests after checking their contribution guidance and existing work.
- Track upstream releases containing accepted changes.
Migration
- Replace every
third_party/rust/ruffpath dependency in the rootCargo.tomlwith the selected pinned upstream dependency. - Remove the Ruff git submodule and its
.gitmodulesentry. - Update bootstrap, contributor and dependency documentation.
- Preserve provider identity/version reporting and lockfile reproducibility.
- Run the template formatter's Python-expression corpus, fixed-point checks, AST/comment equivalence checks, Python binding tests, CLI tests and editor cross-surface tests.
Acceptance criteria
- Citry no longer stores or initializes
third_party/rust/ruff. - A clean checkout can build the formatter without initializing or storing a
vendored Ruff checkout or submodule. - The dependency is pinned and represented fully in
Cargo.lock. - Embedded Python formatting output and all semantic-safety checks remain unchanged, unless a separately reviewed formatter change documents the difference.
- Any required upstream contract is released or pinned to a reviewed immutable revision, with a follow-up path to a normal release.
Activity