feat(libSceIcu): implement uloc_getTableStringWithFallback #26259
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/26259"
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 MarrasFederico on 2026-11-23T15:10:43Z.
What
uloc_getTableStringWithFallbacknow has the seven-argument ICU prototype and forwards to upstreamlocresdata.cpp, built intoicu_common, with checked guest reads of the path, locale and keys and checked writes of the length and status. A new guest test compares the fallback export with the same upstream function built natively on synthetic resource bundles. Every case now has an expected string or an expected null result plus the exact status, checked unconditionally before the native comparison. The synthetic bundles now resolve the nested sub-table, a value found through locale fallback, and a value found through aFallbackentry; they also cover direct lookups, deprecated country replacement, prefailed status and throwing paths.ucol_getRulesis left untouched and still throws on this branch.Tested
Linux, native guest test executables. Head
3eb469710e8cf98a34daede1764f198abf04a60c.nice -n 19 cmake --build build --parallel 7 --target guest_icu_locale_table_fallback_tests, thenctest --test-dir build -R '^guest_icu_locale_table_fallback$' --repeat until-fail:3— 3/3 runs passed (0.01 s).guest_icu_locale_table_fallbacknow also covers au"\u2205\u2205\u2205"no-inheritance item (assertingnullptr,U_MISSING_RESOURCE_ERROR, and*pLength == 0), a missing-locale fallback warning (de_AT->U_USING_FALLBACK_WARNING), and a valid call withpLength == nullptr, each compared against native ICU.core/libs/prx/libSceIcu/LocaleTableFallback.cpptob47b9b838dfails atcore/libs/prx/libSceIcu/tests/LocaleTableFallback.cpp:229("expected fallback miss length"); restored.if (outgoing != incoming)toif (outgoing > 0 && outgoing != incoming)incore/libs/prx/libSceIcu/LocaleTableFallback.cpp(dropping warning statuses) fails atcore/libs/prx/libSceIcu/tests/LocaleTableFallback.cpp:232("expected fallback hit status"); restored (d07d1a263af1a2d1fb17cb8b28133b0ff8314d1b486460685119f020baf03509), then 3/3 rerun passed.nice -n 19 cmake --build build --parallel 7 --target guest_icu_recovered_signatures_tests, thenctest --test-dir build -R '^guest_icu_recovered_signatures$'— passed 1/1.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-23T15:27:55Z.
Review: APPROVED
Verified on Linux (Ubuntu 24.04, GCC 13.3, Ninja, Release) against
b47b9b838d:tools/check_conventions.pypassed.guest_icu_locale_table_fallback_testsbuilt cleanly.guest_icu_locale_table_fallback):core/libs/prx/libSceIcu/LegacyExports.cpp,core/libs/prx/libSceIcu/include/LegacyExports.hpp,core/libs/prx/libSceIcu/LocaleTableFallback.cppreverted 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 PrivacyOnion on 2026-11-23T18:13:47Z.
Review: APPROVED
Verified on Linux (Ubuntu 24.04, GCC 13.3, Ninja, Release) against
3eb469710e:tools/check_conventions.pypassed.guest_icu_locale_table_fallback_testsbuilt cleanly.guest_icu_locale_table_fallback):core/libs/prx/libSceIcu/LegacyExports.cpp,core/libs/prx/libSceIcu/include/LegacyExports.hpp,core/libs/prx/libSceIcu/LocaleTableFallback.cppreverted 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-25T07:47:18Z.
Review: APPROVED
Reviewed — looks good
The changed implementation and its tests support merging at head
3eb469710e8cf98a34daede1764f198abf04a60c; no checks were run in this review, and console ABI behavior remains unverified.What I ran
Read the prepared diff and all changed-file contents at the pinned head. No commands or tests were run in this review; build and test results in the PR description are author-reported.
Results
Findings
Blocking
None.
Non-blocking
None.
Not verified
No build or tests were run during this review. Console ABI and behavior were not verified. Read all changed files listed in
review/manifest.json:cmake/Icu.cmake,core/libs/prx/libSceIcu/CMakeLists.txt,core/libs/prx/libSceIcu/LegacyExports.cpp,core/libs/prx/libSceIcu/LocaleTableFallback.cpp,core/libs/prx/libSceIcu/include/LegacyExports.hpp,core/libs/prx/libSceIcu/tests/LocaleTableFallback.cpp, anddocs/dev/debt/changes/feat-libsceicu-locale-table-fallback.md. No changed files were excluded.To get this to a good state
Nothing is required.