feat(libSceIcu): add the early-return checks of udatpg_open #17215

Closed
MarrasFederico wants to merge 2 commits from upstream-pr/17215 into main
MarrasFederico commented 2026-11-08 14:45:28 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarrasFederico on 2026-11-08T14:45:28Z.


What

Date-time pattern generator open (libSceIcu) - pattern generator creation and locale data are not implemented; non-failure paths throw NotImplemented_nid_no_patch. Signatures and status validation follow ICU 68.2 udatpg.cpp: callers passing a non-null UErrorCode already indicating failure return null without evaluating locale or attempting pattern generation, while a null status pointer throws. Pattern generation requires CLDR locale resource data and DateTimePatternGenerator object lifecycle not available in this module. Closes when: pattern data and generator lifecycle are implemented and validated against console behavior.

The parameterless placeholder for udatpg_open in RecoveredInventory.cpp is replaced by a typed APS5_VABI definition, and the recovered inventory count in docs/dev/debt/libSceIcu.md is updated to match the source.

Tested

Ubuntu 26.04.1 LTS, kernel 7.0.0-38-generic, GCC 15.2.0, Release, BUILD_TESTING=ON, head 363eb106cf merged onto main 20cfe3fbdc. Windows and macOS were not compiled here. No title was run.

  • Built core/libs/prx/libSceIcu/all; ctest -R '^guest_icu_date_time_pattern_generator$': 100% tests passed out of 1.
  • core/libs/prx/libSceIcu/tests/DateTimePatternGenerator.cpp checks the exported signature with a static_assert and the paths above: returns, status values and untouched outputs, plus the inputs that must keep throwing.
  • python3 tools/check_conventions.py --base upstream/main passed and git diff --check is clean.

Checklist

  • Based on current main; no other open PR implements the same functions
  • One topic per PR; follow-ups go in a new PR
  • No comments in code except technical debt
  • Unimplemented paths throw (NotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file
  • No notes, investigation .md files or images added to the repository (attach them to this PR)
  • New third-party code is a submodule built from source
  • Generic behaviour, not specific to one title
  • Depends on: none
  • Fixes: none
  • Unblocks: none
  • GPUs tested: n/a
  • AI-assisted: yes
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:5212251710 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/17215). Originally posted by [MarrasFederico](https://github.com/MarrasFederico) on 2026-11-08T14:45:28Z. --- ### What [Date-time pattern generator open](https://github.com/boykopovar/AnyPS5/blob/main/core/libs/prx/libSceIcu/DateTimePatternGenerator.cpp) (libSceIcu) - pattern generator creation and locale data are not implemented; non-failure paths throw `NotImplemented_nid_no_patch`. Signatures and status validation follow ICU 68.2 [udatpg.cpp](https://github.com/unicode-org/icu/blob/84e1f26ea77152936e70d53178a816dbfbf69989/icu4c/source/i18n/udatpg.cpp#L29-L38): callers passing a non-null `UErrorCode` already indicating failure return null without evaluating locale or attempting pattern generation, while a null status pointer throws. Pattern generation requires CLDR locale resource data and `DateTimePatternGenerator` object lifecycle not available in this module. Closes when: pattern data and generator lifecycle are implemented and validated against console behavior. The parameterless placeholder for `udatpg_open` in `RecoveredInventory.cpp` is replaced by a typed `APS5_VABI` definition, and the recovered inventory count in `docs/dev/debt/libSceIcu.md` is updated to match the source. ### Tested <!-- OS, title or homebrew, what was checked. "Not tested" is a valid answer. A performance change: the summary lines of main and of this PR from the same machine and scene, with the traces attached, captured as the Performance report issue form describes. --> Ubuntu 26.04.1 LTS, kernel 7.0.0-38-generic, GCC 15.2.0, Release, `BUILD_TESTING=ON`, head `363eb106cf` merged onto `main` `20cfe3fbdc`. Windows and macOS were not compiled here. No title was run. - Built `core/libs/prx/libSceIcu/all`; `ctest -R '^guest_icu_date_time_pattern_generator$'`: 100% tests passed out of 1. - `core/libs/prx/libSceIcu/tests/DateTimePatternGenerator.cpp` checks the exported signature with a `static_assert` and the paths above: returns, status values and untouched outputs, plus the inputs that must keep throwing. - `python3 tools/check_conventions.py --base upstream/main` passed and `git diff --check` is clean. ### Checklist <!-- Rules behind each item: https://github.com/boykopovar/AnyPS5/blob/main/CONTRIBUTING.md --> - [x] Based on current `main`; no other open PR implements the same functions - [x] One topic per PR; follow-ups go in a new PR - [x] No comments in code except [technical debt](https://github.com/boykopovar/AnyPS5/blob/main/docs/dev/CONVENTIONS.md) - [x] Unimplemented paths throw (`NotImplemented_nid_no_patch`); silent stubs are listed under Silent stubs in their library's [technical debt](https://github.com/boykopovar/AnyPS5/tree/main/docs/dev/debt) file - [x] No notes, investigation `.md` files or images added to the repository (attach them to this PR) - [x] New third-party code is a submodule built from source - [x] Generic behaviour, not specific to one title - [x] Depends on: none <!-- #PR, or none --> - [x] Fixes: none <!-- issue it closes as Fixes #N, or none --> - [x] Unblocks: none <!-- title ID and Game bring-up discussion, e.g. PPSA01325 #3232, or none --> - [x] GPUs tested: n/a <!-- for AGC, shader recompiler or VideoOut changes: vendor, model, driver and OS of each GPU the GPU tests ran on; otherwise n/a --> - [x] AI-assisted: yes <!-- yes / no -->

Pull request closed

Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
boykopovar/AnyPS5!17215
No description provided.