refactor(libSceIcu): name 1695 legacy exports from ICU 68 symbols #14016

Merged
PrivacyOnion merged 1 commit from upstream-pr/14016 into main 2026-11-05 08:52:43 +00:00
PrivacyOnion commented 2026-10-31 15:58:59 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by PrivacyOnion on 2026-10-31T15:58:59Z.


What

Names 1695 libSceIcu 3.20 placeholders after ICU 68 symbols. Every stub still throws through NotImplemented_nid_no_patch; no behaviour changes.

  • Each new name is a dynamic symbol of libicuuc, libicui18n or libicuio from the ICU 68.2 Ubuntu 20.04 release build (12353 symbols). The _68 renaming suffix is stripped from C names, and the tools/nid_names.py hash of each name equals the 3.20 NID.
  • 1691 of the 2347 sceIcuLegacyUnknown_* stubs in LegacyExports.cpp now use those names: 1293 C++ names in the icu_68 namespace (UnicodeString, UnicodeSet, Locale, Normalizer2, BreakIterator, ResourceBundle, …) and 398 C names (ucnv_*, uprv_*, uhash_*, ures_*, uloc_*, utext_*, udata_*, ucase_*, utrie2_*, ucptrie_*, …).
  • The four sceIcuDispatchUnknown_* stubs in Export.cpp are BreakIterator::createCharacterInstance, createWordInstance, createLineInstance and createSentenceInstance. The selectors 0–3 recorded in the debt are the UBreakIteratorType values those factories pass to createInstance.
  • Renamed stubs drop their explicit APS5_EXPORT and become <symbol>_nid_postfix. The exported NID set of libSceIcu is unchanged: 2474 NIDs before and after, with no duplicates.
  • Left untouched: 24 identified NIDs that open PRs already touch (#12320, #13578, #13128, #11132, #11136), including u_strstr, u_cleanup, u_setMemoryFunctions, uprv_free, utrie_swap and others. 652 legacy NIDs match no ICU 68.2 symbol and stay unknown.
  • docs/dev/debt/libSceIcu.md is updated for both sections.

Tested

Windows 11, MinGW 13.1 (no title run, stubs only).

  • LegacyExports.cpp and Export.cpp compile to objects with the real APS5_VABI and the CI flags.
  • The libSceIcu exported NID set, recomputed from the sources (explicit APS5_EXPORT NIDs plus hashed _nid_postfix names), is identical on main and on this branch.
  • python tools/check_conventions.py --base upstream/main passes.
  • python core/libs/tests/test_public_headers.py --audit-only passes.
  • tools/pr_overlap.py lists only shared files. Diffs of every listed PR were checked for these NIDs and names; the 24 overlapping ones are excluded.

Checklist

  • Based on current main; no other open PR implements the same functions
  • One topic per PR; follow-ups go in a new PR
  • No comments in code except technical debt
  • Unimplemented paths throw (NotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file
  • No notes, investigation .md files or images added to the repository (attach them to this PR)
  • New third-party code is a submodule built from source
  • Generic behaviour, not specific to one title
  • Depends on: none
  • Fixes: none
  • Unblocks: none
  • GPUs tested: n/a
  • AI-assisted: yes
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:5099172408 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/14016). Originally posted by [PrivacyOnion](https://github.com/PrivacyOnion) on 2026-10-31T15:58:59Z. --- ### What Names 1695 libSceIcu 3.20 placeholders after ICU 68 symbols. Every stub still throws through `NotImplemented_nid_no_patch`; no behaviour changes. - Each new name is a dynamic symbol of `libicuuc`, `libicui18n` or `libicuio` from the [ICU 68.2 Ubuntu 20.04 release build](https://github.com/unicode-org/icu/releases/download/release-68-2/icu4c-68_2-Ubuntu20.04-x64.tgz) (12353 symbols). The `_68` renaming suffix is stripped from C names, and the `tools/nid_names.py` hash of each name equals the 3.20 NID. - 1691 of the 2347 `sceIcuLegacyUnknown_*` stubs in `LegacyExports.cpp` now use those names: 1293 C++ names in the `icu_68` namespace (`UnicodeString`, `UnicodeSet`, `Locale`, `Normalizer2`, `BreakIterator`, `ResourceBundle`, …) and 398 C names (`ucnv_*`, `uprv_*`, `uhash_*`, `ures_*`, `uloc_*`, `utext_*`, `udata_*`, `ucase_*`, `utrie2_*`, `ucptrie_*`, …). - The four `sceIcuDispatchUnknown_*` stubs in `Export.cpp` are `BreakIterator::createCharacterInstance`, `createWordInstance`, `createLineInstance` and `createSentenceInstance`. The selectors 0–3 recorded in the debt are the `UBreakIteratorType` values those factories pass to `createInstance`. - Renamed stubs drop their explicit `APS5_EXPORT` and become `<symbol>_nid_postfix`. The exported NID set of libSceIcu is unchanged: 2474 NIDs before and after, with no duplicates. - Left untouched: 24 identified NIDs that open PRs already touch (#12320, #13578, #13128, #11132, #11136), including `u_strstr`, `u_cleanup`, `u_setMemoryFunctions`, `uprv_free`, `utrie_swap` and others. 652 legacy NIDs match no ICU 68.2 symbol and stay unknown. - `docs/dev/debt/libSceIcu.md` is updated for both sections. ### Tested Windows 11, MinGW 13.1 (no title run, stubs only). - `LegacyExports.cpp` and `Export.cpp` compile to objects with the real `APS5_VABI` and the CI flags. - The libSceIcu exported NID set, recomputed from the sources (explicit `APS5_EXPORT` NIDs plus hashed `_nid_postfix` names), is identical on `main` and on this branch. - `python tools/check_conventions.py --base upstream/main` passes. - `python core/libs/tests/test_public_headers.py --audit-only` passes. - `tools/pr_overlap.py` lists only shared files. Diffs of every listed PR were checked for these NIDs and names; the 24 overlapping ones are excluded. ### Checklist <!-- Rules behind each item: https://github.com/boykopovar/AnyPS5/blob/main/CONTRIBUTING.md --> - [x] Based on current `main`; no other open PR implements the same functions - [x] One topic per PR; follow-ups go in a new PR - [x] No comments in code except [technical debt](https://github.com/boykopovar/AnyPS5/blob/main/docs/dev/CONVENTIONS.md) - [x] Unimplemented paths throw (`NotImplemented_nid_no_patch`); silent stubs are listed under Silent stubs in their library's [technical debt](https://github.com/boykopovar/AnyPS5/tree/main/docs/dev/debt) file - [x] No notes, investigation `.md` files or images added to the repository (attach them to this PR) - [x] New third-party code is a submodule built from source - [x] Generic behaviour, not specific to one title - [x] Depends on: none - [x] Fixes: none - [x] Unblocks: none - [x] GPUs tested: n/a - [x] AI-assisted: yes
MarcZX10 commented 2026-10-31 16:25:08 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-31T16:25:08Z.

Review: APPROVED


Reviewed — looks good

The 1,695 renamed exports preserve the existing NID set and map to ICU 68.2 library symbols; the implementations remain explicit unimplemented stubs.

What I ran

Reviewed head c516806ab7a47e154b3d9c229688fe70a39ef173 against base 474030e58424fefdb65e5df9f3820810fbb4553c; the base is an ancestor of the head and the merge preview is clean. Local environment: Debian GNU/Linux 12, Python 3.11.2, GCC 12.2.0. No local project build or compilation was run.

python3 tools/pr_precheck.py --repo boykopovar/AnyPS5 --pr 14016
git diff --check 474030e58424fefdb65e5df9f3820810fbb4553c...c516806ab7a47e154b3d9c229688fe70a39ef173
python3 tools/pr_abi_audit.py --base 474030e58424fefdb65e5df9f3820810fbb4553c --head c516806ab7a47e154b3d9c229688fe70a39ef173 --json
nm -D --defined-only /tmp/icu68-check/icu/usr/local/lib/libicuuc.so.68.2
nm -D --defined-only /tmp/icu68-check/icu/usr/local/lib/libicui18n.so.68.2
nm -D --defined-only /tmp/icu68-check/icu/usr/local/lib/libicuio.so.68.2
gh pr checks 14016 -R boykopovar/AnyPS5

Results

Check Result
Diff check, conventions/template, merge preview Passed; preview clean against the stated base
Exported NID comparison Base and head each contain 2,474 unique NIDs; no IDs added or removed, and no duplicates
ICU symbol mapping All 1,695 renamed legacy/dispatch NIDs map to distinct dynamic symbols in the official ICU 68.2 Ubuntu 20.04 libraries after stripping the C-symbol _68 suffix
ABI audit helper Reported 1,695 literal export-removed warnings because it compares old placeholder names to new names; the independent NID-set comparison shows these are renames, not removed NIDs
Windows hosted job Linked libSceIcu.prx; selected tests passed: 2,523/2,523
Hosted checks Conventions, portability, intake, labels, eligibility and report passed; Linux and relinker jobs were skipped
Build/test quality helper launch The precheck's isolated checkout lacked the untracked helper scripts; no local C++ tests or build were run
Unedited result output
base exports: 2474 unique: 2474 duplicate NIDs: 0
head exports: 2474 unique: 2474 duplicate NIDs: 0
removed NIDs: 0 added NIDs: 0
renamed legacy/dispatch NIDs: 1695 unique: 1695 not in ICU 68.2 shared-library exports: 0
windows	pass	9m28s	https://github.com/boykopovar/AnyPS5/actions/runs/41217427321/job/124584819256
linux	skipping	0	https://github.com/boykopovar/AnyPS5/actions/runs/41217427321/job/124584820359
register-context	skipping	0	https://github.com/boykopovar/AnyPS5/actions/runs/41217427321/job/124584820567
relinker	skipping	0	https://github.com/boykopovar/AnyPS5/actions/runs/41217427321/job/124584820395
relinker-asan	skipping	0	https://github.com/boykopovar/AnyPS5/actions/runs/41217427321/job/124584820691
write-watch	skipping	0	https://github.com/boykopovar/AnyPS5/actions/runs/41217427321/job/124584820148
conventions	pass	30s	https://github.com/boykopovar/AnyPS5/actions/runs/41217427455/job/124584792112
eligibility	pass	6s	https://github.com/boykopovar/AnyPS5/actions/runs/41217427321/job/124584790981
intake	pass	4s	https://github.com/boykopovar/AnyPS5/actions/runs/41217427512/job/124584792544
labels	pass	10s	https://github.com/boykopovar/AnyPS5/actions/runs/41217427405/job/124584791835
library-portability	pass	1m44s	https://github.com/boykopovar/AnyPS5/actions/runs/41217427264/job/124584790323
report	pass	1m9s	https://github.com/boykopovar/AnyPS5/actions/runs/41217427265/job/124584790589
windows	Link changed host-only core/libs test executables	[2362/2925] Linking CXX shared library core\\libs\\libs\\unpatched\\libSceIcu.prx
windows	Link changed host-only core/libs test executables	OK: D:/a/AnyPS5/AnyPS5/build/core/libs/libs/libSceIcu.prx
windows	Build and run changed guest core/libs tests	100% tests passed, 0 tests failed out of 2523
windows	Build and run changed guest core/libs tests	Total Test time (real) = 174.06 sec

Sources

Not verified

  • No local build, Linux build, relinker matrix, console run, or title behavior was tested. The hosted Windows result is a selected test run, not a complete product suite.
  • Matching exported names and NIDs does not establish that the original prototypes or runtime behavior are correct; all renamed entries continue to throw.
<!-- greyfinch-sync:boykopovar/AnyPS5:review:5723756303 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/14016#pullrequestreview-5723756303). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-31T16:25:08Z. **Review:** APPROVED --- # Reviewed — looks good The 1,695 renamed exports preserve the existing NID set and map to ICU 68.2 library symbols; the implementations remain explicit unimplemented stubs. ## What I ran Reviewed head `c516806ab7a47e154b3d9c229688fe70a39ef173` against base `474030e58424fefdb65e5df9f3820810fbb4553c`; the base is an ancestor of the head and the merge preview is clean. Local environment: Debian GNU/Linux 12, Python 3.11.2, GCC 12.2.0. No local project build or compilation was run. ```sh python3 tools/pr_precheck.py --repo boykopovar/AnyPS5 --pr 14016 git diff --check 474030e58424fefdb65e5df9f3820810fbb4553c...c516806ab7a47e154b3d9c229688fe70a39ef173 python3 tools/pr_abi_audit.py --base 474030e58424fefdb65e5df9f3820810fbb4553c --head c516806ab7a47e154b3d9c229688fe70a39ef173 --json nm -D --defined-only /tmp/icu68-check/icu/usr/local/lib/libicuuc.so.68.2 nm -D --defined-only /tmp/icu68-check/icu/usr/local/lib/libicui18n.so.68.2 nm -D --defined-only /tmp/icu68-check/icu/usr/local/lib/libicuio.so.68.2 gh pr checks 14016 -R boykopovar/AnyPS5 ``` ## Results | Check | Result | |---|---| | Diff check, conventions/template, merge preview | Passed; preview clean against the stated base | | Exported NID comparison | Base and head each contain 2,474 unique NIDs; no IDs added or removed, and no duplicates | | ICU symbol mapping | All 1,695 renamed legacy/dispatch NIDs map to distinct dynamic symbols in the official ICU 68.2 Ubuntu 20.04 libraries after stripping the C-symbol `_68` suffix | | ABI audit helper | Reported 1,695 literal `export-removed` warnings because it compares old placeholder names to new names; the independent NID-set comparison shows these are renames, not removed NIDs | | Windows hosted job | Linked `libSceIcu.prx`; selected tests passed: 2,523/2,523 | | Hosted checks | Conventions, portability, intake, labels, eligibility and report passed; Linux and relinker jobs were skipped | | Build/test quality helper launch | The precheck's isolated checkout lacked the untracked helper scripts; no local C++ tests or build were run | <details><summary>Unedited result output</summary> ```text base exports: 2474 unique: 2474 duplicate NIDs: 0 head exports: 2474 unique: 2474 duplicate NIDs: 0 removed NIDs: 0 added NIDs: 0 renamed legacy/dispatch NIDs: 1695 unique: 1695 not in ICU 68.2 shared-library exports: 0 ``` ```text windows pass 9m28s https://github.com/boykopovar/AnyPS5/actions/runs/41217427321/job/124584819256 linux skipping 0 https://github.com/boykopovar/AnyPS5/actions/runs/41217427321/job/124584820359 register-context skipping 0 https://github.com/boykopovar/AnyPS5/actions/runs/41217427321/job/124584820567 relinker skipping 0 https://github.com/boykopovar/AnyPS5/actions/runs/41217427321/job/124584820395 relinker-asan skipping 0 https://github.com/boykopovar/AnyPS5/actions/runs/41217427321/job/124584820691 write-watch skipping 0 https://github.com/boykopovar/AnyPS5/actions/runs/41217427321/job/124584820148 conventions pass 30s https://github.com/boykopovar/AnyPS5/actions/runs/41217427455/job/124584792112 eligibility pass 6s https://github.com/boykopovar/AnyPS5/actions/runs/41217427321/job/124584790981 intake pass 4s https://github.com/boykopovar/AnyPS5/actions/runs/41217427512/job/124584792544 labels pass 10s https://github.com/boykopovar/AnyPS5/actions/runs/41217427405/job/124584791835 library-portability pass 1m44s https://github.com/boykopovar/AnyPS5/actions/runs/41217427264/job/124584790323 report pass 1m9s https://github.com/boykopovar/AnyPS5/actions/runs/41217427265/job/124584790589 ``` ```text windows Link changed host-only core/libs test executables [2362/2925] Linking CXX shared library core\\libs\\libs\\unpatched\\libSceIcu.prx windows Link changed host-only core/libs test executables OK: D:/a/AnyPS5/AnyPS5/build/core/libs/libs/libSceIcu.prx windows Build and run changed guest core/libs tests 100% tests passed, 0 tests failed out of 2523 windows Build and run changed guest core/libs tests Total Test time (real) = 174.06 sec ``` </details> ## Sources - [Renamed exports still call `NotImplemented_nid_no_patch` at head `c516806a`](https://github.com/boykopovar/AnyPS5/blob/c516806ab7a47e154b3d9c229688fe70a39ef173/core/libs/prx/libSceIcu/LegacyExports.cpp#L12-L18) - [The four dispatch stubs at head `c516806a`](https://github.com/boykopovar/AnyPS5/blob/c516806ab7a47e154b3d9c229688fe70a39ef173/core/libs/prx/libSceIcu/Export.cpp#L24-L38) - [NID calculation helper at base `474030e5`](https://github.com/boykopovar/AnyPS5/blob/474030e58424fefdb65e5df9f3820810fbb4553c/tools/nid_names.py#L32-L38) - [ICU release source at commit `84e1f26e`](https://github.com/unicode-org/icu/tree/84e1f26ea77152936e70d53178a816dbfbf69989) and [the versioned ICU 68.2 Ubuntu 20.04 release asset](https://github.com/unicode-org/icu/releases/download/release-68-2/icu4c-68_2-Ubuntu20.04-x64.tgz) ## Not verified - No local build, Linux build, relinker matrix, console run, or title behavior was tested. The hosted Windows result is a selected test run, not a complete product suite. - Matching exported names and NIDs does not establish that the original prototypes or runtime behavior are correct; all renamed entries continue to throw.
THEMANnt commented 2026-10-31 19:33:29 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by THEMANnt on 2026-10-31T19:33:29Z.

Review: APPROVED


Reviewed c516806ab7a47e154b3d9c229688fe70a39ef173 against 474030e58424fefdb65e5df9f3820810fbb4553c. No actionable issue found in this stub-renaming change. Independently recomputed the complete ICU export inventory: 2,474 unique NIDs before and after, no duplicates or additions/removals. All 1,695 renames retain the same NIDs and throwing bodies; the other parsed function bodies are unchanged.

Windows/MSYS2 GCC 16.2 Release: built the library and passed all eight registered ICU suites in an isolated DLL-linked harness with minimal libc support. Hosted Windows compiled the library and reported 2,523/2,523 selected tests passing on a merge containing this head. Whitespace passes. I did not complete an independent symbol-table comparison against the official ICU binary archive; no implementation or console ABI validation is inferred from the recovered names.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5724570379 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/14016#pullrequestreview-5724570379). Originally posted by [THEMANnt](https://github.com/THEMANnt) on 2026-10-31T19:33:29Z. **Review:** APPROVED --- Reviewed `c516806ab7a47e154b3d9c229688fe70a39ef173` against `474030e58424fefdb65e5df9f3820810fbb4553c`. No actionable issue found in this stub-renaming change. Independently recomputed the complete ICU export inventory: 2,474 unique NIDs before and after, no duplicates or additions/removals. All 1,695 renames retain the same NIDs and throwing bodies; the other parsed function bodies are unchanged. Windows/MSYS2 GCC 16.2 Release: built the library and passed all eight registered ICU suites in an isolated DLL-linked harness with minimal libc support. Hosted Windows compiled the library and reported 2,523/2,523 selected tests passing on a merge containing this head. Whitespace passes. I did not complete an independent symbol-table comparison against the official ICU binary archive; no implementation or console ABI validation is inferred from the recovered names.
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
boykopovar/AnyPS5!14016
No description provided.