gen_d3d12_stubs: preserve multiline comment breaks, reject empty paths, and write atomically (GEN-D3D12-STUBS-COMMENTS-AND-IO) #1583
No reviewers
No assignees
Labels
No labels
bug
dependencies
documentation
enhancement
missing claim
needs rebase
needs-triage
question
ready-for-agent
submodules
No project
No milestone
Dependencies
No dependencies set
Notifications
1 participant
Due date
No due date set.
Reference
leonida/mandy!1583
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/gen-d3d12-stubs-comments-and-io"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Pull request successfully merged and closed
Item:
GEN-D3D12-STUBS-COMMENTS-AND-IO(unclaimed — coordination issue #14 is at GitHub's 2,500-comment cap with no successor open issue yet, and 0 open PRs touchtools/gen_d3d12_stubs.py).Summary
/* ... */block comments inparse_interfaces(), preventing adjacent declarations or preprocessor directives after*/from merging into a single malformed method signature.--out,--report, and--headerarguments instead of silently ignoring"", falling back toINCLUDEon--header "", or creating whitespace-named files incwd.write_if_changed()read withnewline=""(so stale CRLF files are rewritten to LF) and stage writes atomically viafile_mode.published_mode+replace_retry.replace(preserving existing files on failure and keeping direct writes for non-regular targets), with strict JSON (allow_nan=False).OSErrorwhen reading--headeror--sourcefiles inmain(argv=None)and return a clean one-lineERROR:with exit code 2 instead of a raw traceback.Verification
python3 -W error -I tests/test_gen_d3d12_stubs.py -v: 49 passed, 1 skipped (Windows-only case-fold test).python3 -I tests/test_text_write_line_endings.py: 3/3 passed.python3 -I scripts/check_no_game_data.py tools/gen_d3d12_stubs.py tests/test_gen_d3d12_stubs.py: passed.python3 -m compileall -q tools/gen_d3d12_stubs.py tests/test_gen_d3d12_stubs.py: passed.main:tools/gen_d3d12_stubs.py):failures=9, errors=1across all 5 new regression tests.AI-assisted: yes
GPUs tested: none (CPU-only Python build tool; synthetic headers only, no game data)
Red/green: the PR's tests fail on main and pass with this PR (Linux, Python 3.13.18).
Targeted batch of 19 PRs (their tests, the tests importing the changed modules, the docs tests) on main 3ca0707: no new failure, Linux / Python 3.13.
AI-assisted (Claude Code, Claude Opus 5.5)