fix(tools): decode CMake cache with utf-8-sig in configure_seed #7997
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/7997"
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 boykopovar/AnyPS5. Originally posted by emirplus on 2026-10-19T17:11:55Z.
What
When
CMakeCache.txtcontains a UTF-8 byte order mark (BOM,\xef\xbb\xbf), which CMake and editors on Windows frequently emit,Path(cache).read_text(encoding="utf-8")kept the leading\ufeffcharacter on the first line.As a result,
line.startswith("//")evaluated toFalseon the first entry's doc comment, leavingdocempty and silently omitting the first configure check result from the generated seed file.Decode with
utf-8-sigto strip any leading UTF-8 BOM.Tested
python tools/check_conventions.py --base origin/mainpython -m unittest tools/tests/test_configure_seed.pyChecklist
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)