feat(libSceIcu): implement the internal ucase property and mapping exports #18203
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/18203"
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 rocklouis055 on 2026-11-10T20:39:55Z.
What
Implements the 12 internal libSceIcu case-property exports by forwarding them to ICU 78.1's compiled-in case tables, built from the
3rdparty/icusubmodule that #13578 added. #13578 has merged and main is merged into this branch; the PR's own change isd90c2d208f, plus the merge resolution against main'subidi/unorm2work. It needs no ICU data file, so it does not depend on #16971's data build. The slice was claimed in discussion #11150. No open PR implements these exports; #14340 and #14443 only move the stubs.ucase_getType,ucase_getTypeOrIgnorableucase_isSoftDotted,ucase_isCaseSensitiveUBoolas one signed byteucase_tolower,ucase_toupper,ucase_totitle,ucase_foldfoldhonoursU_FOLD_CASE_EXCLUDE_SPECIAL_Iucase_toFullLower,ucase_toFullUpper,ucase_toFullTitleUCASE_LOC_*) and an optionalUCaseContextIteratorucase_toFullFoldingUCaseContextIteratoris called through a host trampoline (CaseProperties.cpp) with the guest calling convention, so context-sensitive mappings such as Greek final sigma use the guest's own text.*pStringset, or~cwhen the character is unchanged. A nullpStringthrowsstd::invalid_argument; ICU writes through it.LegacyExports.cpp/.hpp. The debt file gains an entry for the gaps: Unicode 17.0 tables vs. an ICU 68 module, theUCASE_LOC_*numbering, and no console comparison. The "older callable exports" entry is updated to match.Tested
Linux (GCC, Release):
guest_icu_case_propertiestest passes. Its expected values come from UnicodeData, SpecialCasing and CaseFolding: İ/ı Turkic cases, ß → SS/Ss/ss, U+0587 in root and Armenian, DŽ/Dž/dž, U+1E9E folding, U+0307 sensitivity, out-of-range code points, and final vs. medial sigma through a guest iterator, including an ignorable apostrophe between the letters.guest_icu_*tests pass.-fsyntax-onlywith zigx86_64-windows-gnufor both new files.CaseProperties.cppall make the test abort: dropping the iterator, fixing the iteration direction, not throwing on a nullpString,getTypeOrIgnorable→getType, ignoringfoldoptions, ignoringtoFullFoldingoptions, andisCaseSensitive→ "has a case type".Merge notes: removing these stubs touches lines next to the stubs #16605, #14340 and #14443 remove from
LegacyExports.cpp/.hpp. The "older callable exports" debt sentence is also rewritten by #16605 and #14340. Each is a one-line resolution. The test registration, header include and new debt entry are placed so they conflict with no open PR.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 MarcZX10 on 2026-11-10T21:01:12Z.
Review: COMMENTED
Reviewed — looks good
I found no blocking source-level defect in the exact diff; this is a comment rather than an approval while the Windows job is still running and the changed C++ tests have not run on this head.
What I ran
Reviewed head
d90c2d208ffbe30ee67374b88de13b6652ecb15bagainst livemain0aa98c0a07c74b1ebc8b9389185b6ff1d2978b38; the merge preview is clean. The PR API still reported base02c52411e5b4df59e192301818182a228a9d353b, so I used the live branch tip for the precheck. Environment: Debian Linux x86_64, Python 3.11.2, GCC 12.2.0.I read all changed-file areas across three delegated source reviews. No local build or CTest was run.
Results
Recorded output
Diff check:
Conventions:
Merge preview:
Hosted checks at the time of review:
Findings
Blocking
None found in the reviewed source.
Non-blocking
None.
Sources
Not verified
To get this to a good state
Let the Windows check finish and run the four focused ICU tests (
CaseMapping,CaseProperties,Properties, andUnicodeData) on this exact head. I will re-check the same head and results before changing this review status.Imported from boykopovar/AnyPS5. Originally posted by PrivacyOnion on 2026-11-11T16:55:08Z.
Review: CHANGES_REQUESTED
Verified on Linux (Ubuntu 24.04, GCC 13.3, Ninja, Release) against
d90c2d208f:tools/check_conventions.pypassed;git diff --checkclean.windows.guest_icu_case_mapping_tests,guest_icu_case_properties_tests,guest_icu_properties_tests,guest_icu_unicode_data_testsbuilt cleanly.guest_icu_properties,guest_icu_case_mapping,guest_icu_case_properties,guest_icu_unicode_data):core/libs/prx/libSceIcu/CaseMapping.cpp,core/libs/prx/libSceIcu/CaseMapping.hpp,core/libs/prx/libSceIcu/Export.cpp,core/libs/prx/libSceIcu/Identified.hpp,core/libs/prx/libSceIcu/LegacyExports.cpp,core/libs/prx/libSceIcu/Properties.cpp,core/libs/prx/libSceIcu/Properties.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.Generated withfooter from the description; the AI-assisted checkbox can stay.Requesting changes for the points above.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-12T21:19:32Z.
Review: COMMENTED
Reviewed libSceIcu case-property exports — no blocking findings
The diff implements the 12 internal
ucase_*exports on the ICU 78.1 tables and removes their stubs; I found no defect in the changed code, but the ICU prototypes and the author's test runs are not verified here.What I ran
Head SHA
f07b3d4e8578243f20e90fa322600a91e3acec55, basemain. Read-only checks with the repository reader (repo_read.py):No build or test was run. The Linux test run, the mutation check and the Windows syntax check are the author's reports only.
Results
guest_icu_case_propertiesucase.hFindings
Blocking
None.
Non-blocking
None found by reading the changed code.
Not verified
ucase.h, including theUCaseContextIteratorsignature and thecaseLocaletype. The reader cannot see3rdparty/icu.docs/dev/debt/libSceIcu.md(1689 of 2347, 654, 650). They were not recounted, and the 12ucase_*names are now implemented in a different file.CMakeLists.txt,LegacyExports.cpp,include/LegacyExports.hpp,libSceIcu.hppand the debt file. Their unchanged lines were not read.To get this to a good state
Nothing is required.
Optional: recount the 1689, 654 and 650 figures in
docs/dev/debt/libSceIcu.md, since the 12ucase_*names moved out ofLegacyExports.cpp.Imported from boykopovar/AnyPS5. Originally posted by PrivacyOnion on 2026-11-13T12:44:18Z.
Review: APPROVED
Verified on Linux (Ubuntu 24.04, GCC 13.3, Ninja, Release) against
9e0e663350:tools/check_conventions.pypassed;git diff --checkclean.guest_icu_case_properties_testsbuilt cleanly.guest_icu_case_properties):core/libs/prx/libSceIcu/LegacyExports.cpp,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-14T03:04:15Z.
Review: COMMENTED
Reviewed — no blocking findings
The review covers head
9e0e663350c11c83cbca85e7d1264a36c1fe7a8b; no checks were run independently, and console ABI and behavior remain unverified as documented.What I ran
No build or tests were run. I read the prepared diff, description, commit list, manifest, and each changed line range; I also checked the context iterator trampoline, argument exception macro, and related case mapping conventions through
repo_read.py.Results
Findings
Blocking
None.
Non-blocking
Not verified
LegacyExports.cppandinclude/LegacyExports.hppcontain no added lines; their removed stub ranges were reviewed in the diff, not by reading each full file.core/libs/prx/libSceIcu/CMakeLists.txt,CaseProperties.cpp,CaseProperties.hpp,LegacyExports.cpp(changed ranges in diff),include/LegacyExports.hpp(changed ranges in diff),libSceIcu.hpp,tests/CaseProperties.cpp, anddocs/dev/debt/libSceIcu.md; also the review description, commits, manifest, diff, and README. No changed files were excluded by the manifest.To get this to a good state
Nothing is required. The optional point above is to run the reported checks independently when a build environment is available.
Imported from boykopovar/AnyPS5. Originally posted by PrivacyOnion on 2026-11-14T22:50:19Z.
Review: APPROVED
Verified on Linux (Ubuntu 24.04, GCC 13.3, Ninja, Release) against
7bc6bab506:tools/check_conventions.pypassed;git diff --checkclean.guest_icu_case_properties_testsbuilt cleanly.guest_icu_case_properties):core/libs/prx/libSceIcu/LegacyExports.cpp,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