refactor(prx): name the libfreetype and NpTcs stubs the NID database resolves #14827
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/14827"
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 RyanIsAinmDom on 2026-11-01T18:51:19Z.
What
tools/nid_names.pyresolves the 24 libfreetype and 8 libSceNpTcs*Unknown_*exports onmainthrough its pinned aerolib database, and every suggestion passes itscompute_nid(name) == nidcheck (statusrename-ready). They are the onlyrename-readyplaceholders in libraries that no open pull request touches, and this names all 32, as #12457 did for libSceXml, libSceNKWebKit, libSceJsc and libSceFreeTypeOl. Behaviour is unchanged: every body still throws throughNotImplemented_nid_no_patch, and each library exports the same NIDs as onmain. A title that reaches one of them now fails with the function's name instead of the placeholder's.<prefix><Name>_nid_no_patchthat keeps its NID alias: the five 3.20 exportsFT_Get_Color_Glyph_Layer,FT_Get_Var_Axis_Flags,FT_Palette_Data_Get,FT_Palette_SelectandFT_Set_Default_Propertiesaslibfreetype<Name>, the 19 older ones (FTC_Manager_New,FT_Bitmap_Blend,FT_Error_String,FT_Gzip_Uncompress,FT_New_Glyph,FT_Stream_OpenGzipand others) asfreetypeLegacy<Name>sceNpTcsIntAbortRequest,sceNpTcsIntCreateContext,sceNpTcsIntCreateRequest,sceNpTcsIntDestroyContext,sceNpTcsIntDestroyRequest,sceNpTcsIntUploadDataToNewSlot,sceNpTcsIntUploadDataToNewSlotEnd,sceNpTcsIntUploadDataToNewSlotWriteFT_*symbols, so a same-named export here would be a duplicate. Each helper is its placeholder withUnknown_<NID>replaced by the symbol withoutFT_(FTC_Manager_NewbecomesFtcManagerNew, asFTA_becameFtain #12457), and its declaration stays inInventoryExports.hpporLegacyExports.hpp.LegacyExports.hpp, so each name keeps exactly one header declaration.3rdparty/freetype) gives the same 24 names for the libfreetype NIDs. The libSceNpTcs names come from the database only.Left out on purpose:
_dup2(W8f1adVl+48):nid_names.pyreportsname-in-use.Export.cppopen pull requests edit.Tested
CachyOS x86-64, GCC 16.2.1, Release build, on
mainf2d874c1fdwith and without this commit.libfreetype.prxandlibSceNpTcs.prxand their NID-patched copies: the patched export tables hold the same NIDs onmainand on this branch (24 and 11). On the branch, libSceNpTcs no longer carries the eightnpTcsLegacyUnknown_*helper symbols.RTLD_NOW. CallingC3-qsnriefE,qCyybpSyZzI,3ruFwEv4KQgandxSse4lLrSNAstill throws, now asfreetypeLegacyBitmapBlend_nid_no_patch not implemented,libfreetypePaletteSelect_nid_no_patch not implemented,sceNpTcsIntCreateContext not implementedandsceNpTcsIntCreateRequest not implemented.tools/nid_names.pylists no placeholder in either library afterwards (rename-ready4,623 to 4,591 tree-wide), and--wherefinds each NID under its new name.test_public_headers.py --audit-only(399 libraries),check_conventions.py --base origin/mainwith this title and description,git diff --check.tools/pr_overlap.py --branch: no overlap with open pull requests (2,023 probed).libsbuild, Windows, macOS, a console, any title.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)🤖 Generated with Claude Code
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-01T19:11:36Z.
Review: COMMENTED
Reviewed — no blocking findings
Every NID survives the renames: the eight NpTcs names hash to the NIDs they replace, and the FreeType helpers keep their explicit aliases. Approval waits for the hosted jobs, which had not finished at review time.
What I ran
c464590c219c7a1ef2300b542e939b364d22c4db; basef2d874c1fd(merge base is the same commit). 7 files, +91/-99: libSceNpTcs (2 files), libfreetype (3 files), and two debt files. I read the whole diff.tools/nid_names.pycompute_nid: the eight NpTcs names (sceNpTcsInt…) hash to the eight NIDs the old helpers carried, 8 of 8. For libfreetype, theFT_names hash to the explicit NIDs they keep, 10 of 10 sampled. The C helper identifiers do not hash, which is expected because those exports keep their explicit alias.core/.NotImplemented_nid_no_patch.Results
Commands and unedited precheck output
Commands:
python3 tools/pr_precheck.py --repo boykopovar/AnyPS5 --pr 14827 --output-dir <scratch>/precheck/14827(report.md in that directory).python3 tools/pr_abi_audit.py --base f2d874c1fd --head c464590c219c7a1ef2300b542e939b364d22c4db --json. Result: passed_with_warnings; 67 symbols; 32 export-removed findings, which are the 32 renamed identifiers. The audit's "0 alias mismatches" does not cover the helpers, because their computed NIDs are null; the NID check above is the evidence for them.tools/nid_names.pycompute_nidon each new name against the NID in the explicit alias (or against the NID the old name carried).Precheck table (unedited):
The precheck deliberately does not configure, build, or compile AnyPS5.git diff --check f2d874c1fdccf781c0fa5d86619bb5dd8894b958...c464590c219c7a1ef2300b542e939b364d22c4db/marc/Conlyse-VIEJO/.venv/bin/python3 tools/check_conventions.py --base f2d874c1fdccf781c0fa5d86619bb5dd8894b958 --head c464590c219c7a1ef2300b542e939b364d22c4db --title refactor(prx): name the libfreetype and NpTcs stubs the NID database resolves --body /dev/shm/reviewer-run/precheck/14827/pr-body.md/marc/Conlyse-VIEJO/.venv/bin/python3 tools/pr_abi_audit.py --base f2d874c1fdccf781c0fa5d86619bb5dd8894b958 --head c464590c219c7a1ef2300b542e939b364d22c4db --jsonNo changed Python implementation files.No changed tools/ module has an existing sibling tools/tests/test_<module>.py suite.No changed test_*.py files./marc/Conlyse-VIEJO/.venv/bin/python3 /marc/AnyPS5/tools/pr_stack_check.py 14827 --repo boykopovar/AnyPS5 --output-dir /dev/shm/reviewer-run/precheck/14827/stackNot run: C++ tests need exact-head binaries, which require a build; the precheck does not build./marc/Conlyse-VIEJO/.venv/bin/python3 /dev/shm/reviewer-run/precheck/14827/head-c464590c219c-b351aad9/tools/pr_test_quality.py --root /dev/shm/reviewer-run/precheck/14827/head-c464590c219c-b351aad9 --json core/libs/prx/libSceNpTcs/Export.cpp core/libs/prx/libSceNpTcs/include/LegacyExports.hpp core/libs/prx/libfreetype/Export.cpp core/libs/prx/libfreetype/include/InventoryExports.hpp core/libs/prx/libfreetype/include/LegacyExports.hpp docs/dev/debt/libSceNpTcs.md docs/dev/debt/libfreetype.mdNo changed Python test module in tools/ can be run as a no-build base-source control.Negative control
Not run. The change has no test to control.
Findings
Blocking
None.
Non-blocking
nid_names.py, so the next rename does not break it.libfreetypePaletteDataGetforFT_Palette_Data_Get). That is the design the PR body describes, and the NIDs are kept by the explicit aliases.Sources
github.com/boykopovar/AnyPS5@c464590c21/core/libs/prx/libSceNpTcs/Export.cpp (L30-L58)github.com/boykopovar/AnyPS5@c464590c21/core/libs/prx/libSceNpTcs/include/LegacyExports.hppgithub.com/boykopovar/AnyPS5@c464590c21/core/libs/prx/libfreetype/Export.cppgithub.com/boykopovar/AnyPS5@c464590c21/docs/dev/debt/libSceNpTcs.mdandgithub.com/boykopovar/AnyPS5@c464590c21/docs/dev/debt/libfreetype.mdNot verified
compute_nid, not against a console.To get this to a good state
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-01T19:12:07Z.
Review: APPROVED
Reviewed — looks good
The export rename preserves the 32 existing NIDs at head
c464590c219c7a1ef2300b542e939b364d22c4db; the required hosted checks passed.What I ran
Reviewed head
c464590c219c7a1ef2300b542e939b364d22c4dbagainst basef2d874c1fdccf781c0fa5d86619bb5dd8894b958; the exact-head merge preview was clean. Environment: Debian GNU/Linux 12, Python 3.11.2, Git 2.39.5. No build or compiler run.Results
mainCommands and raw results
git diff --check ...: no output; exit status 0.python3 tools/pr_precheck.py --repo boykopovar/AnyPS5 --pr 14827:Local ABI audit status:
passed_with_warnings; its 32 warnings are removals of the old placeholder names, which this rename intentionally replaces. Manual source comparison confirmed each target definition and declaration. The merge report says:All heads unchanged: True;PR #14827: clean against current base.Pinned database lookup for the eight NpTcs names:
The FreeType lookup returned 24 suggestions and
0 names already in use; their explicitAPS5_EXPORTaliases are unchanged in the diff. Hosted checks at this head:conventions pass,intake pass,labels pass.Negative control
Not applicable: this PR changes export names and declarations only; it adds no tests or assertions to exercise with a negative control.
Findings
Blocking
None found in the reviewed diff.
Non-blocking
The automated ABI audit flags the old export names as removed; manual comparison confirms each is replaced by the intended name while preserving the NID mapping.
Sources
Not verified
No local build, full C++ test suite, Windows/macOS build, console runtime, or title-level behavior was run. The build and RTLD_NOW results in the PR description are author-reported, not independently reproduced here.
To get this to a good state
No changes are required based on this review. If the head changes, I will repeat the diff, NID mapping and relevant checks on the new head.