Skip to content

fix(format-rust): use null-delimited git ls-files to prevent quote decoding errors - #921

Merged
LunaStev merged 1 commit into
wavefnd:masterfrom
tecnolgd:fix/format-rust-ls-files
Oct 12, 2026
Merged

LunaStev merged 1 commit into
wavefnd:masterfrom
tecnolgd:fix/format-rust-ls-files

Conversation

@tecnolgd

@tecnolgd tecnolgd commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Fixed an issue in tools/format-rust.py where line-delimited git ls-files parsing dropped or failed on file paths containing spaces or non-ASCII (Unicode) characters. Switched to null-delimited processing (-z) to parse file paths safely.

Motivation

Non-ASCII and space-separated file names caused git to wrap paths in double quotes in standard line-delimited outputs, resulting in parsing failures and silent omissions. This update aligns the utility script with robust null-delimited path handling.

Closes #892

Target and compatibility impact

Python tooling script(tools/format-rust.py) only. No changes to compiler targets, ABIs, or language contracts.

Validation

  • Python compile Check: python3 -m py_compile tools/format-rust.py

  • Corpus Verification: python3 tools/check_wave_corpus.py

  • Manual testing: Created local test files containing spaces and non-ASCII Unicode characters (e.g., café.rs, café with spaces.rs).

    Verified that the original line-delimited .splitlines() implementation silently dropped these entries (discovering 206 files), whereas the new null-delimited -z implementation correctly identifies and processes all 208 files without truncation or quoting corruption.

Checklist

  • Commits include a DCO Signed-off-by line.
  • Tests cover new behavior or the PR explains why no test is needed.
  • User-facing changes include documentation or diagnostics updates.
  • The change preserves the license boundary between the compiler and std/.

…coding errors

Signed-off-by: tecnolgd <tecnolgd@proton.me>

@LunaStev LunaStev left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM thanks

@LunaStev
LunaStev merged commit d9fe76d into wavefnd:master Oct 12, 2026
35 checks passed
@tecnolgd
tecnolgd deleted the fix/format-rust-ls-files branch October 12, 2026 15:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Read Rust file names from Git without quote decoding errors

2 participants