A registry and a needed-libraries file of 200000 opening brackets have to end in
an audit error with exit code 2 and the read-error message, not a traceback.
progress.py skips every definition whose name ends in _nid_no_patch or
_nid_no_patch_cut, which are meant to be internal helpers. Some libraries
export such functions with APS5_EXPORT under an explicit NID or name:
libSceAgcVsh (150), libSceNKWebKit (150) and libSceJson2's inventory
(66), all of them calling NotImplemented_nid_no_patch. None of the 366
was counted, so those three libraries showed 151 of 151 functions where
they declare 517, and import_audit, which takes its stub list from the
same scan, reported imports of them as implemented.
A _nid_no_patch definition is now skipped only when no APS5_EXPORT in its
library exports it. The library totals go from 6104 of 12305 to 6104 of
12671 on main.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Specify utf-8-sig encoding when reading library source files in
source_stubs so UTF-8 characters are preserved on Windows and leading
BOMs are tolerated.
Reconfigure stdout and stderr streams to UTF-8 with backslashreplace
at the beginning of main, and specify UTF-8 encoding when writing test
fixtures.
A compound statement that is not a conditional, loop or lambda always runs, so its calls are collected like the body's own and its exits stop the scan. An export whose only throw sits in such a block stays a stub and fails a strict audit.
A conditional return, co_return or goto before the throwing call leaves a path that succeeds, so the audit stops collecting calls at it and the export, or a helper it calls, is partial. A guard that throws still leaves every path throwing, so it stays a stub.
The previous check called any stub call inside an #if block partial,
so an export that throws in every #if, #elif and #else alternative was
reported as partial. Each combination of preprocessor branches is now
expanded into its own body, an #if without #else gets an empty
alternative, and the export is a stub when every combination reaches
the throw. More than 256 combinations in one function, or unbalanced
directives, are reported as errors.
A NotImplemented_nid_no_patch call inside an #if, #ifdef or #ifndef block
opened in the export's own body runs only on some hosts, so the export
is partial, not a stub. An export wrapped in a preprocessor block from
outside its body keeps its class.
An export whose body reaches NotImplemented_nid_no_patch on every path,
directly or through a helper that always reaches it, stays a stub. One
that reaches it only under a condition (if, else, loop, switch, ternary,
short-circuit or lambda) is now classified as partial, so implemented
exports with guards for unknown behaviour are no longer counted as stubs.
progress.py and the progress page are unchanged.
A needed library with no file in --libs or --modules is reported, but when the
file sits elsewhere in the converted title's folder the report gave no way to
find it. import_audit now looks for it, case-insensitively, up to four levels
below each registry's folder and names the directory to pass with --modules.
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>