feat(libSceIcu): implement locale variant and keyword editing #18344
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/18344"
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 fogydes on 2026-11-11T10:45:48Z.
What
Implement
uloc_getVariantanduloc_setKeywordValuethrough the existing source-built ICU 78.1 backend. Variant normalization, capacity/termination handling, keyword editing, overflow atomicity and incoming status follow pinned ICU commit049e0d6a420629ac7db77256987d083a563287b5,icu4c/source/common/uloc.cpp. Null guest-default-locale requests remain throwing. This is source-backed behavior; PS5 console ABI and ICU data-version parity remain unverified, including the older ICU 68 symbols in the PS5 3.20 inventory.The branch is based on main
4c0998e1a81and preserves the merged script-property implementation and portable native locale backend. Remaining gaps and inventory changes usedocs/dev/debt/changes/libSceIcu-locale-syntax.md; the canonical debt file is unchanged. No new third-party sources or data are added.Original measurements against
ce111157b8b: implemented 192 → 193, TODO 2550 → 2549, total 2742 unchanged;uloc_getVariantremains TODO-classified because its unknown default-locale path throws. These are historical counts, not a current-main recount.Tested
Windows 11 / WinLibs GCC 15.2 Release at
ce3032cc77ff756a218df6b861b250574d0b33ea: rebuilt affected runtime libraries and test targets; 4/4 CTests passed (guest_icu_locale_syntax,guest_icu_locale_core,guest_icu_language_tag,guest_appcontent). The locale test covers capacities, canaries, variant parsing, keyword insertion/replacement/removal, overflow preservation, status propagation and throwing guards. Current conventions, debt-fragment validation, whitespace and merge-tree checks passed.The AppContent failure from the previous hosted run was independently reproduced at its outdated assertion using the exact CI-main source; main now includes the upstream #20058 revert. No AppContent patch or weakened assertion is part of this PR.
Earlier implementation validation included 35/35 Windows ICU tests and 3/3 native Linux locale tests. Those runs predate the current maintenance merge; no new Linux or console run is claimed. Prior overlap inspection found textual hazards but no competing implementation of these two exports; source behavior is unchanged by maintenance. New hosted checks are pending.
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)Imported from boykopovar/AnyPS5. Originally posted by PrivacyOnion on 2026-11-11T15:55:40Z.
Review: APPROVED
Verified on Linux (Ubuntu 24.04, GCC 13.3, Ninja, Release) against
79585147e1:tools/check_conventions.pypassed;git diff --checkclean.guest_icu_locale_syntax_testsbuilt cleanly.guest_icu_locale_syntax):core/libs/prx/libSceIcu/Export.cpp,core/libs/prx/libSceIcu/LegacyExports.cpp,core/libs/prx/libSceIcu/include/InventoryExports.hpp,core/libs/prx/libSceIcu/include/LegacyExports.hpp,core/libs/prx/libSceIcu/libSceIcu.hppreverted tomain, the new tests do not build/link without the change; restoring it makes them build and pass.Looks Good To Me
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-12T15:41:12Z.
Review: COMMENTED
feat(libSceIcu): locale variant and keyword editing — no blocking findings
Nothing blocks this; the points below are optional.
What I ran
Head
79585147e1c3cbbe84f82597a755c2739860f342, basemain. No build, no tests and nogit diff --checkin this pass. Repository files were read through the reader only:Results
uscript_props.cppregistered onceFindings
Blocking: none.
Non-blocking: none.
Not verified
guest_icu_locale_syntaxwas not run. The Windows and Linux results are the author's report.GuestIcuLocaleSyntax.cpp:79expectsstd::runtime_errorfromNotImplemented_nid_no_patch. The search found only test-local definitions of that helper, so the exception type for this test binary is not verified.GuestIcuLocaleSyntax.cpp:314-315asserts that a capacity below the input length returns status 1 and writes nothing, even when the result would fit. This follows the author's claim about pinned ICU 78.1uloc.cpp, which I did not read.docs/dev/debt/libSceIcu.md:398gives 55 remaining throwing functions.Export.cpphas 82NotImplemented_nid_no_patchcalls at head, and the doc does not state its counting rule, so the figure is not verified.docs/dev/debt/libSceIcu.md:411saysuloc_getNamestays throwing. The definition is atLegacyExports.cpp:9402; its body was not read.Export.cpp,LegacyExports.cpp,LegacyExports.hpp,InventoryExports.hpp,libSceIcu.hppand the debt doc were reviewed from diff hunks. They were not read in full at head. The NID mapping for the new_nid_postfixnames was not checked.To get this to a good state
Nothing is required.
Optional:
GuestIcuLocaleSyntax.cpp:79and the capacity rule atGuestIcuLocaleSyntax.cpp:314-315when CI runs.Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-14T14:35:57Z.
Review: APPROVED
Reviewed — looks good
Nothing blocks this change; the points below are optional.
What I ran
Reviewed head
ca7eec16be3ebedce7c2a8ddaec9fa6829d4644d. No commands or tests were run; the supplied description reports Windows and Linux build/test results, which I did not independently verify. Read all changed files markedincluded: trueinmanifest.json, includingGuestIcuLocaleSyntax.cpp; no changed files were excluded.Results
Findings
Blocking
None.
Non-blocking
uloc_getVariantanduloc_setKeywordValueare implemented against ICU 78.1, while the PS5 3.20 inventory contains ICU 68 symbols. The debt notes document that console ABI and behavior remain unverified; consider retaining that caveat prominently when describing compatibility. Changed lines:core/libs/prx/libSceIcu/LocaleSyntax.cpp:13,core/libs/prx/libSceIcu/LocaleSyntax.cpp:22.Not verified
I did not run builds, tests, a negative control, or console behavior checks. Reported Windows and Linux results and overlap checks were not independently verified. The prepared review contains no excluded changed files.
To get this to a good state
Nothing is required. Optional: compare the wrappers with console behavior when a suitable console trace or execution environment is available.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-15T08:57:25Z.
Review: APPROVED
Reviewed — looks good
Nothing blocks this change; the source implementation and its focused tests support merging, while console ABI and ICU data-version parity remain unverified.
What I ran
Reviewed head
ce3032cc77ff756a218df6b861b250574d0b33ea. No commands or tests were run by me; the Windows 11 / WinLibs GCC 15.2 Release checks in the PR description are author-reported.Results
Findings
Blocking
None.
Non-blocking
None.
Not verified
PS5 console ABI and behavior, ICU 68 parity, Linux behavior and hosted checks were not verified. The PR description says hosted checks are pending. All changed files listed in the manifest's
reviewedsection were read:core/libs/prx/libSceIcu/CMakeLists.txt,core/libs/prx/libSceIcu/Export.cpp,core/libs/prx/libSceIcu/LegacyExports.cpp,core/libs/prx/libSceIcu/LocaleSyntax.cpp,core/libs/prx/libSceIcu/LocaleSyntax.hpp,core/libs/prx/libSceIcu/include/InventoryExports.hpp,core/libs/prx/libSceIcu/include/LegacyExports.hpp,core/libs/prx/libSceIcu/libSceIcu.hpp,core/libs/tests/GuestIcuLocaleSyntax.cpp, anddocs/dev/debt/changes/libSceIcu-locale-syntax.md. No files were excluded by the manifest.To get this to a good state
Nothing is required.