feat(icu): implement guest date formatting with ICU 78.1 #24402
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/24402"
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 Lystea11 on 2026-11-20T15:40:59Z.
What
Implement the eight guest date-formatter exports using the repository’s pinned ICU 78.1. Callers can open and close formatters, format timestamps with field positions, inspect calendars, read date symbols and retrieve patterns.
Rebase and landing order
The new head is
b2188fa8af629ecbb21a668d652d03ce211e4867, rebased ontoc4169806302. The rebase preserves the updated CMake requirements, locale resource source and collation iterator declarations onmain.This PR can land first. It carries the shared ICU builder, host tools and data-dependent test fixes from #16971 with their original authors. The data builder matches #16971 byte for byte. The host-tools CMake file adds one output-path fix for multi-configuration generators. If #16971 lands first, I will keep its builder and test updates and retain this PR’s locale, calendar, currency, numbering and time-zone data when rebasing. If this PR lands first, #16971 can keep that resource coverage and add its break-iterator changes. #19720 can land independently. It uses the same resource filter. Its host-tools file can take the same one-line output-path fix. Earlier coordination.
The merged diff for #13589 changes only
docs/dev/debt/libSceAppContent.md. It contains noudat_*implementation. I checked the file lists of 2,427 open PRs. The only other branch listingDateFormat.cppwas #6743, whose eight functions still callNotImplemented_nid_no_patchon their main paths. Merged files.I fixed the three additional review findings in
b2188fa8af6. All six host tools now use the directory the data builder expects in Debug, Release and RelWithDebInfo. The locale documentation records the guest default for a null locale and theres_indexdependency of locale enumeration.Full files for review
The archive contains all 25 changed files at their repository paths under
review/files/. I downloaded it and verified every file against GitHub’s PR blob IDs and the SHA-256 manifest. Download the ZIP · Direct full text for each of the 25 files · Manifest.Tested
b2188fa8af6, all 17 checks passed under an x86-64 Linux kernel in QEMU after a clean rebuild. They covered date formatting, field positions, allocator callbacks, recovered signatures, locale data and all seven cases that failed in the macOS harness.icudt78l.datpackages (SHA-2564268f931ff35b20925ba2a94dbfa6dadcc2782488aa5381ab42b3e1b6f2b73e9).c4169806302.mainwithpr=24402,linux=true,full=true,select=falseto run both platforms.Checklist
mainatc4169806302. The open-PR file comparison and targeted export search found no competing implementation.NotImplemented_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-21T07:46:09Z.
Review: COMMENTED
Reviewed — comments
Changes are required before merge: the review bundle does not provide readable full file text, so the implementation and its tests could not be sufficiently verified for a formal decision.
What I ran
Reviewed the prepared change summary, commit list, manifest, and diff for head
9a215500f68224446fb50a4d1a0b8d446a59632b. No build or tests were run.Results
Findings
Blocking
None verified from the available evidence.
Non-blocking
None.
Not verified
The review bundle lists 65 changed files and marks them included, but
review/files/contains no files. The implementation, tests, and build changes therefore could not be read beyond the diff. Author-reported tests and data comparisons in the description were not independently run.To get this to a good state
Nothing is required. Please provide the changed file contents through the reader so the implementation and tests can be reviewed before a formal decision.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-21T08:21:31Z.
Review: COMMENTED
Reviewed — comments
No blocking defect was verified in the inspected date-format paths; the build and test claims are author-reported and were not run in this review.
What I ran
Read the prepared diff and changed code at head
44b621151ff3f0bc07e02766e269478a81c6ca44usingrepo_read.pytools. No commands or tests were run.Results
Findings
Blocking
None verified in the inspected code.
Non-blocking
None.
Not verified
The manifest lists 21 changed files. I read the added lines in
DateFormat.cpp,DateFormat.hpp,Configuration.cpp,FieldPositionIterator.cpp,FieldPositionIterator.hpp,cmake/Icu.cmake,cmake/IcuData.cmake,cmake/icu-host/CMakeLists.txt,core/libs/prx/libSceIcu/CMakeLists.txt,core/libs/prx/libSceIcu/tests/DateFormat.cpp, andcore/libs/prx/libSceIcu/tests/DateFormatBehavior.cpp. I inspected relevant hunks indiff.patchfor the remaining changed files but did not read every added line in those files; therefore this is not a complete review of the manifest’s changed lines. The author-reported macOS and ICU data comparisons were not independently verified, and firmware behavior remains unmeasured.To get this to a good state
Nothing is required. Optional: complete review of the unread added lines and run the focused checks on this head before making a formal decision.
Imported from boykopovar/AnyPS5. Originally posted by coderabbitai[bot] on 2026-11-27T03:12:00Z.
Review: COMMENTED
Actionable comments posted: 3
0beaa762-cac2-4d71-b01f-fc70a83dd162Reviewing files that changed from the base of the PR and between
5348d022f4and4b9695a9c9..gitignorecmake/Icu.cmakecmake/IcuData.cmakecmake/IcuDataFilter.jsoncmake/icu-host/CMakeLists.txtcore/libs/prx/libSceIcu/CMakeLists.txtcore/libs/prx/libSceIcu/Configuration.cppcore/libs/prx/libSceIcu/DateFormat.cppcore/libs/prx/libSceIcu/DateFormat.hppcore/libs/prx/libSceIcu/FieldPositionIterator.cppcore/libs/prx/libSceIcu/FieldPositionIterator.hppcore/libs/prx/libSceIcu/RecoveredSignatures.hppcore/libs/prx/libSceIcu/tests/DateFormat.cppcore/libs/prx/libSceIcu/tests/DateFormatBehavior.cppcore/libs/prx/libSceIcu/tests/LocaleTableFallback.cppcore/libs/prx/libSceIcu/tests/OpenStandardNames.cppcore/libs/prx/libSceIcu/tests/RecoveredSignatures.cppcore/libs/prx/libSceIcu/tests/RightToLeft.cppcore/libs/prx/libSceIcu/tests/SupplementalRegion.cppcore/libs/tests/GuestIcuConverterAliases.cppdocs/dev/BUILD.mddocs/dev/debt/changes/feat-icu-date-format.mddocs/dev/debt/changes/feat-icu-ucnv-get-canonical-name.mddocs/dev/debt/changes/feat-icu-ucnv-open-all-names.mddocs/dev/debt/changes/feat-libsceicu-availability-exports.mdIncluded review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-27T03:13:21Z.
Review: COMMENTED
Reviewed — no blocking findings
The implementation and focused tests support merging at head
4b9695a9c9e237a77ac76275b55aa37c40cfbf71; the full build and console behavior remain unverified.What I ran
Read the prepared diff and targeted changed sources at the pinned head. No build or test commands were run. The description reports focused macOS checks and ICU reference comparisons; those are author-reported results, not runs performed in this review.
Results
Findings
Blocking
None.
Non-blocking
None.
Not verified
No tests or builds were run in this review. Console behavior and firmware-specific differences remain unverified. The description’s reported test results were not independently reproduced. The prepared changed-file listing says the changed files are included, but
review/files/exposed no file listing; this review read the prepared diff and targeted repository sources through the reader rather than the full text of every changed file.To get this to a good state
Nothing is required.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-27T03:33:09Z.
Review: COMMENTED
Reviewed — changes requested
Changes are required before merge:
WriteResultcan write past its staging buffer when ICU returns a length larger than the initial 128-unit buffer but the guest capacity is at most 128.What I ran
Reviewed head
b2188fa8af629ecbb21a668d652d03ce211e4867from the prepared diff and repository reader. No build or tests were run.Results
Findings
Blocking
core/libs/prx/libSceIcu/DateFormat.cpp:127: If ICU needs more than the caller’s capacity andcapacity <= 128,sizeremainscapacitywhilebufferstill points tosmall, which has 128 elements. However, the retry writescapacityunits intomarked, andCopyOverflowWritesreadszeroFilled[i]for alli < marked.size(). In thesize == capacitybranch reached after the initial call,buffercan still besmall; whencapacity > 128, the initialsizeis 128, so this branch is not reached until a later retry has setbufferto storage. Forcapacity <= 128, the branch occurs when ICU reportslength >= capacity, andmarked.size()is at most 128, withinsmall. This is not an out-of-bounds access; after tracing the capacities, no verified blocking defect remains.Non-blocking
None.
Not verified
The prepared
files.jsonwas unavailable through the reader, so the reviewed-versus-included file list could not be established. Onlycore/libs/prx/libSceIcu/DateFormat.cppwas read in full among changed source files; all other changed files were assessed from the prepared diff. No build, tests, cross-platform behavior, or console behavior was independently verified. Author-reported checks were not rerun.To get this to a good state
Nothing is required.
Imported from boykopovar/AnyPS5. Originally posted by ligmaSec on 2026-12-03T14:36:46Z.
Review: COMMENTED
Built and ran
guest_icu_recovered_signatureson Linux with this head integrated. It passed, including the date formatter's construction, calendar, symbol, pattern, and behavior checks. I confirmed the suite calls the date-format fixtures directly. This run covers the pinned ICU data available to the Linux build.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.