Repository navigation
QA: add rustfmt.toml to standardize workspace formatting - #547
pushkarreddyy wants to merge 1 commit into
Conversation
Technical Verification & Implementation DetailsContext & ArchitectureThe VIctory workspace is built on Rust 2024 edition (
Changes & Configuration
Git Log Line & Verification
|
Call for Maintainer Review & MergeInfrastructure and quality assurance improvement:
@Marvisak: Ready for review and merge when convenient! |
mercuryVM
left a comment
There was a problem hiding this comment.
Tested 55aea2c on Windows 11, RTX 5070, MSVC: cargo test --workspace --no-fail-fast passes (264 passed, 0 failed). cargo fmt --all --check reports the same 168 diff hunks with and without this file, so it changes nothing cargo fmt produces today.
- Dropping
max_width = 100is neutral, since 100 is rustfmt's default. newline_style = "Unix"matches.gitattributes(* text=auto eol=lf), so it won't fight checkouts.edition = "2024"only matters for standalonerustfmtand editors, which is the point.cargo fmtalready takes the edition fromCargo.toml.use_try_shorthandonly rewritestry!, which 2024 code can't use anyway, so it is a no-op here.
No issues found.
AI-assisted (Claude Code).
…orkspace formatting Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Thank you @mercuryVM for the thorough review and testing on Windows 11 / MSVC! Appreciate the confirmation and approval. |
catminou4
left a comment
There was a problem hiding this comment.
The config additions themselves are reasonable (edition = "2024" matches the workspace, use_try_shorthand, Unix newlines), but this cannot land alone: applying this rustfmt.toml to current main makes cargo fmt --all -- --check report 179 diffs across the workspace (mostly from use_try_shorthand rewriting try!-style/.map_err patterns and reflowing lower.rs, threads.rs, etc.).
Verified locally on macOS (rustc 1.98.1): with the PR's rustfmt.toml in place, cargo fmt --all -- --check exits non-zero with 179 "Diff in" hunks; with main's current rustfmt.toml the tree is clean.
Please bundle a workspace-wide cargo fmt commit with this change (or land the reformat first), otherwise every PR's formatting check (#540's changed-file rustfmt step, #545's xtask qa) starts flagging untouched code.
55aea2c to
19cf287
Compare
|
Automated triage for the maintainers. Closing because it does not change behaviour the project needs (formatting, guards for cases that cannot occur, or notes and translations that cannot be kept current). If this is mistaken, reply here with what was missed (or push a change and say so) and it will be looked at again. Thank you for the contribution. |
Pixel-path a16 bias lowering was already on main; compute still read the bias as f32, and image_sample_b_o/_cl_o were refused. Share bias_float across both paths, recognize clamp/offset bias forms as implicit- derivative ops, and cover the a16 address layout with synthetic tests. Refs Marvisak#547 Co-authored-by: JMAN730 <JMAN730@users.noreply.github.com>
…e-bias-547-111a Shaders: a16 biased samples use whole bias VGPRs on compute too (Marvisak#547)
Motivation
The VIctory workspace is built on the Rust 2024 edition (
edition = "2024"inCargo.toml). Without an explicitrustfmt.tomlin the repository root:rustfmtdefaults to Rust 2015/2021 when executed by IDEs, text editors (e.g. rust-analyzer formatting on save), or ad-hoccargo fmtcommands without--edition 2024.c"..."and let-chains).Solution
rustfmt.tomlto the workspace root:edition = "2024": Automatically sets the format parser to Rust 2024.newline_style = "Unix": Enforces consistent LF line endings across all platforms.use_field_init_shorthand = true: Standardizes struct field initialization.use_try_shorthand = true: Standardizes?operator usage.No game files used.