Scripts: parse C integer spellings in tiling masks #2651
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/2661"
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?
Imported from ivall/xcl. Originally posted by luckyteagirl on 2026-11-26T05:23:11Z.
gen_tiling.pyparses swizzle mask constants from a C header but rejects valid C integer spellings such as octal010and uppercase hexadecimal0X10. Parse those tokens with C-style bases so regeneration does not fail when a header uses them.What is in it
0xhexadecimal prefix in swizzle values.Tested
b49be183, the octal and uppercase-hex fixtures each failed; both pass with this patch. Full Python script discovery passed 26/26 on Windows.gfx10SwizzlePattern.hproduced identical 48,204-byte output on main and this branch, matching the checked-intiling_tables.rsbyte for byte. No generated source changed.git diff --checkand independent source review passed. PR #1587 edits the same generator and test file for other behavior and may require a mechanical rebase.Regression run
Not tested
AI use
Imported from ivall/xcl. Originally posted by github-actions[bot] on 2026-12-01T02:32:41Z.
Nothing has happened on this PR for 3 days, so it is marked
staleand will be closed in 4 days. A push or a comment takes the mark off: rebase it ontomainif it conflicts, and say in one line what it still fixes. If it only waits for a maintainer, a comment saying so is enough.Imported from ivall/xcl. Originally posted by Foniass on 2026-12-01T08:37:02Z.
Triage (#1607) – head
d002e93No open PR changes integer parsing in gen_tiling.py
value. #2685 changes comment stripping and table matching; the lines shared with it are the test's mode list and fixture setup. #1587 only requotes the same line.On main,
int('010', 0)raises and0X10is rejected; the new code reads leading-zero literals as C octal and accepts0Xprefixes, and the test checks 010, 0X10, 16 andX0 ^ 010. No problems found in the diff.Recommendation: keep open.
AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human.
Imported from ivall/xcl. Originally posted by Decodere on 2026-12-02T09:05:37Z.
merge-check
base:
1c8b551475head:
d002e93325merge: clean (
git merge --no-editonto1c8b5514,git diff --checkclean;scripts/gen_tiling.pyandscripts/test_gen_tiling.py, +46/-2)build: not run (Tier 0 Python generator diff; no Rust code changed)
tests:
python -m unittest discover -s scripts -p "test_gen_tiling.py" -v-> 1 passed, 0 failed (new test file);python -m unittest discover -s scripts -p "test_*.py"-> 66 passed, 1 error (test_discord_mirror.pyon Windows, same failure on base1c8b5514). Rust workspace tests not run (Tier 0).review: Read the full diff (+46/-2). Parses uppercase
0Xhex prefixes with base 16 and leading-zero ASCII digit literals as C octal (int(part, 8 if part.startswith('0') else 10)) invalue()(scripts/gen_tiling.py:32-35), fixingValueErroron C octal masks like010and0X10while keeping0=0and rejecting invalid octal digits. The new test verifies010,0X10,16,0x20,0, andX0 ^ 010end-to-end. No problems found.performance: none (offline table generator in
scripts/; zero runtime impact)verdict: safe to merge
hardware / tool and model: NVIDIA GeForce RTX 4060 8 GB (driver 621.40), Intel Core i5-11400F, 32 GB RAM, Windows 11 Build 26200, Python 3.15.2, Rust 1.100.1 MSVC, DXC 1.9.2602.17 / Antigravity (Gemini 4 Neon)
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.