Repository navigation
feat(tools): add a module filter and JSON output to progress.py - #6323
Gabrieljr42 wants to merge 2 commits into
Conversation
|
Windows encoding follow-up for write_site at head ef88d3d (AI-assisted). The entry point sets stdout to UTF-8, but the five Path.write_text calls still use the platform file encoding. With Windows CP1252 and UTF-8 mode disabled, a Unicode-named module selected with --module is scanned correctly, then generation crashes in progress.svg with UnicodeEncodeError, after earlier site files have already been written. The attached patch adds encoding="utf-8" to the five write_site writes. Counting, filtering, stdout and newline policy are unchanged. A new regression runs the real CLI subprocess with -X utf8=0, PYTHONUTF8=0 and PYTHONIOENCODING=cp1252 against a synthetic root containing one implemented function in a Unicode-named library. It checks that all five files decode as UTF-8, SVG/HTML retain the label and JSON retains the name and 1/1 totals. Windows 11, CPython 3.12.14 (native CP1252 default verified):
The suites cover progress, encoding, history, read_encoding, render_sliver and wrappers. I checked #6447's progress.py edit: it changes label clipping, not file encodings. Bundle: applicable patch, regression, exact original/fixed tool/test dependencies and results. Isolated Python/synthetic validation only; no full-tools/conventions suite, current-main composition, CTest/native build, GPU/title/FPS or Linux/macOS testing. No changes pushed to your branch. |
ef88d3d to
3a2e9d2
Compare
|
Thanks for catching this, @simonbronk. Fixed in 3a2e9d2: all five site files now use explicit UTF-8. The new CLI regression reproduces the CP1252 failure before the fix and passes afterward. All 40 progress-related tests and the conventions check pass on Windows. I also rebased onto 44df216 from main and checked #6447; its label-clipping change doesn't overlap this fix. |
|
Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap.
|
|
I manually checked the shared #6039 changes the opening paragraph's workflow link from Progress to Pages. This PR adds the #6039 currently conflicts with its base branch, which prevents the bot from completing that comparison. GitHub reports no merge conflict for this PR at |
What
tools/progress.pyaccepts a repeatable--module NAMEthat limits library totals to those directories undercore/libs/prx, and--jsonthat prints theprogress.jsonobject to stdout. Shader counts stay complete. A shared-source wrapper is included only when its own directory is named. The output directory is optional when either flag is set. A run that only names the directory still writes the whole tree.The five generated site files are explicitly written as UTF-8, including Unicode module names on Windows.
Tested
Windows, CPython 3.12.14 with native CP1252 encoding verified. The new real-CLI regression reproduces the UnicodeEncodeError before the fix with
-X utf8=0,PYTHONUTF8=0andPYTHONIOENCODING=cp1252. After the fix, all five site files decode as UTF-8, the Unicode module name is preserved, and the JSON totals remain 1/1.All 40 progress-related tests pass:
python tools/check_conventions.py --base origin/mainalso passes. Rebased onto44df21632from main. No native build, hardware/title, Linux or macOS testing.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repository (attach them to this PR)