feat(libSceIcu): implement u_strToTitle over the ICU break data #18210
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/18210"
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-10T21:20:46Z.
What
Implements
u_strToTitleby forwarding it to ICU 78.1. This PR is stacked on #16971; the branch merges #16971's current head (ec69fdad70), and the PR's own changes are934c673cd6and9ae27ad4b5. The slice was claimed in discussion #11150.UBreakIteratorfrom this library'subrk_openis used as is, so the guest's boundaries apply (for example character or sentence breaks). As in ICU, the call replaces the iterator's text.IJ, Turkish dottedİ, and the title forms ofßanddž.NotImplemented_nid_no_patchwhen the call would otherwise proceed, the same as #13578'su_strToLower/u_strToUpper. A failing status or invalid arguments still return ICU's result without throwing.U_USING_DEFAULT_WARNING(-127) from the root break rules. The test pins this so it shows up if the data filter changes.RecoveredInventory.cpp/.hpp, the recovered-inventory debt entry now counts 48 stubs left in that file, and a titlecasing debt entry is added.Tested
Linux (GCC, Release):
guest_icu_titlecasetest passes. It covers:en/nl/tr, an apostrophe inside a word, anddž→Dž,ß→Ss;ubrk_open, including a reused iterator and UAX #29 SB8 (no break before a lowercase sentence start);UErrorCode.guest_icu_*tests pass.-fsyntax-onlywith zigx86_64-windows-gnufor both new files.Merge notes:
RecoveredInventory.cpp/.hpp, so that needs a one-line resolution.RecoveredInventoryand the same count sentence, so whichever merges second recounts.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:29:04Z.
Review: DISMISSED
Reviewed — changes requested
The nested ICU host project requires a newer CMake than the root project promises, and two new tests do not exercise all behavior their checks claim to cover.
What I ran
Reviewed head
934c673cd6f52a798d4ab8794b413540ff746260against base41b9e25ddc2b29c1b2fffb4df7aaf495a8867fe0; GitHub reports the PR is open and conflicting withmain. Environment: Linux x86_64, Python 3.11.2, GCC 12.2.0, CMake 3.25.1.The precheck ran
git diff --check, conventions, the lexical ABI audit, dependency/mergeability check, and test-quality heuristics. I also read all changed files in three review slices. I did not build or run CTest.Results
git diff --checkexited 0 with no output.All conventions checks passed.#13578 → #16971 → #18210; #13578's current head is absent from #16971, and #16971/#18210 conflict withmain.Negative control
Findings
Blocking
${CMAKE_COMMAND}. A build using CMake 3.20 can pass the root version check and then fail while configuring the host project. Align the minimum versions, or remove any 3.21-only requirement from the nested project.Reallocateupdateslargestonly when called with a null pointer; the non-null path callsstd::reallocwithout recordingsize. The later “does not allocate a copy” assertion therefore does not detect a large allocation through that path. Track non-null reallocation sizes and assert the intended behavior.u_charDirectiononly whenUnicodeData.txtprovides a direction, while its success message claims matching properties for all code points. IncludeDerivedBidiClass.txtdefaults (or equivalent range coverage), or narrow the claim and report direction coverage accurately.Non-blocking
Sources
Not verified
To get this to a good state
Align the CMake requirements, make the two test claims match what the tests actually exercise, and update the stacked dependency heads. I will rerun the same precheck and review the new head.
Imported from boykopovar/AnyPS5. Originally posted by PrivacyOnion on 2026-11-11T17:16:38Z.
Review: CHANGES_REQUESTED
Verified on Linux (Ubuntu 24.04, GCC 13.3, Ninja, Release) against
934c673cd6:tools/check_conventions.pypassed;git diff --checkclean.guest_icu_break_iterator_tests,guest_icu_case_mapping_tests,guest_icu_data_tests,guest_icu_properties_tests,guest_icu_titlecase_tests,guest_icu_unicode_data_testsbuilt cleanly.guest_icu_properties,guest_icu_case_mapping,guest_icu_unicode_data,guest_icu_break_iterator,guest_icu_break_unicode_0,guest_icu_break_unicode_1,guest_icu_break_unicode_2,guest_icu_break_unicode_3,guest_icu_titlecase,guest_icu_data_registration,guest_icu_break_allocator):core/libs/prx/libSceIcu/CaseMapping.cpp,core/libs/prx/libSceIcu/CaseMapping.hpp,core/libs/prx/libSceIcu/Configuration.cpp,core/libs/prx/libSceIcu/Export.cpp,core/libs/prx/libSceIcu/Identified.hpp,core/libs/prx/libSceIcu/Properties.cpp,core/libs/prx/libSceIcu/Properties.hpp,core/libs/prx/libSceIcu/RecoveredInventory.cpp,core/libs/prx/libSceIcu/RecoveredInventory.hpp,core/libs/prx/libSceIcu/include/InventoryExports.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-14T05:10:15Z.
Review: COMMENTED
Reviewed — comments
The titlecase wrapper and tests are present, but the review is incomplete because the dependency build changes and other reviewed files were not fully inspected.
What I ran
Read the prepared diff and repository files at head
5e92316dd36f1f37fc890140bee1b3a729b70c81usingrepo_read.pytools; no build or tests were run.Results
Findings
Blocking
None.
Non-blocking
None.
Not verified
The review did not read every file listed as reviewed in the manifest. In particular, the full contents of the new build files, tests, and debt documentation were not all inspected. Build graph correctness, test behavior, platform-specific behavior, and the author's reported test results are therefore not verified. The prepared diff excluded files listed in
files.json, which was unavailable through the reader; exclusions were not verified.To get this to a good state
Nothing is required.
Imported from boykopovar/AnyPS5. Originally posted by PrivacyOnion on 2026-11-15T20:59:56Z.
Review: APPROVED
Verified on Linux (Ubuntu 24.04, GCC 13.3, Ninja, Release) against
5e92316dd3:tools/check_conventions.pypassed;git diff --checkclean.guest_icu_break_iterator_tests,guest_icu_data_tests,guest_icu_titlecase_testsbuilt cleanly.guest_icu_break_iterator,guest_icu_break_unicode_0,guest_icu_break_unicode_1,guest_icu_break_unicode_2,guest_icu_break_unicode_3,guest_icu_titlecase,guest_icu_data_registration,guest_icu_break_allocator):core/libs/prx/libSceIcu/Configuration.cpp,core/libs/prx/libSceIcu/Export.cpp,core/libs/prx/libSceIcu/RecoveredInventory.cpp,core/libs/prx/libSceIcu/RecoveredInventory.hpp,core/libs/prx/libSceIcu/include/InventoryExports.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 ligmaSec on 2026-12-03T20:26:29Z.
Review: COMMENTED
u_strToTitlestill refuses a null locale, although current main now has the guest default-locale getter thatResourceCount.cppalready uses. Could the rebased wrapper resolve that guest default and add a case that sets the default to Turkish, then passes a null locale with a source that distinguishes Turkish casing? The pinned ICU implementation uses the locale for case mapping even when the caller provides a break iterator. ICU title-case implementationSource review at
5e92316dd3. The trial merge conflicts in the ICU build and export files.AI-assisted: yes.
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.