mirror of
https://github.com/ubiquitarianism/leonida.git
synced 2026-11-27 00:30:52 +01:00
[PR #1842] tools/spirv_loop_guard: preserve CRLF boundaries, validate limits and add unit tests #1854
Labels
No labels
bug
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
starred/leonida#1854
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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 Information
Original PR: https://github.com/ubiquitarianism/leonida/pull/1842
Author: @kirigayakazima
Created: 11/25/2026
Status: 🔄 Open
Base:
main← Head:fix/spirv-loop-guard-safety📝 Commits (1)
65055catools/spirv_loop_guard: preserve CRLF boundaries, validate limits and add unit tests📊 Changes
2 files changed (+192 additions, -4 deletions)
View changed files
➕
tests/test_spirv_loop_guard.py(+183 -0)📝
tools/spirv_loop_guard.py(+9 -4)📄 Description
Claimed in the coordination issue as: SPIRV-LOOP-GUARD-CRLF-SAFETY-AND-TESTS (https://github.com/ubiquitarianism/leonida/issues/1608#issuecomment-7163090236)
What and why
\rfrom_LINE(([^;\r\n]*)) intools/spirv_loop_guard.pyso Windows CRLF SPIR-V assembly does not split appendedOpPhiincoming pairs across a bare\r.parse_limit()withargparse.ArgumentTypeErrorand rejectbool/non-intlimits upfront inadd_guards()(ValueError).len(args) >= 2forOpConstantand raiseValueErrorwhen guard declarations are needed without anyOpFunctioninstead of failing withIndexErrororTypeError.tests/test_spirv_loop_guard.py.Tested
python -I tests/test_spirv_loop_guard.py -v->Ran 9 tests in 0.001s,OK.upstream/main(98c2f777) baseline worktree withtests/test_spirv_loop_guard.py->Ran 9 tests in 0.004s,FAILED (failures=4, errors=6).python -I tests/test_ci_registration.py->Ran 16 tests in 5.189s,OK.python -I tests/test_text_write_line_endings.py->Ran 3 tests in 11.779s,OK.python -I scripts/check_no_game_data.py tools/spirv_loop_guard.py tests/test_spirv_loop_guard.py-> exit0.python -I -m compileall -q tools/spirv_loop_guard.py tests/test_spirv_loop_guard.pyandgit diff --check-> exit0.GPUs tested: n/a (CPU/stdlib Python tests on Windows 11 x64)
AI-assisted: yes
Checklist
needs rebase).🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.