feat(libSceIcu): implement compatibility normalization #19413

Closed
THEMANnt wants to merge 1 commit from upstream-pr/19413 into main
THEMANnt commented 2026-11-13 08:52:37 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by THEMANnt on 2026-11-13T08:52:37Z.


What

Build the pinned ICU compatibility data into the existing ICU common library and expose the NFKC, NFKD, NFKC casefold and FC_NFKC_Closure guest exports. The implementation uses the upstream normalizer and needs neither an external runtime file nor a new dependency.

Tested

Windows x64 (GCC 15.2.0 MinGW, Ninja, Release) on head 4aab85ea2d. guest_icu_normalization, guest_icu_properties, and all five guest_icu_default_locale_* cases each passed three consecutive runs. Conventions and whitespace checks passed.

Windows (GCC 15.2.0 MinGW, Ninja, Release) on ffedfcf6be. Passed guest_icu_normalization and guest_icu_properties. The new coverage verifies instance lookup, compatibility decomposition and composition, removal of a default ignorable during casefold and a nonempty closure mapping. Conventions and whitespace checks passed. The overlap tool hit a GitHub API EOF. Exact export searches and comparison with the broad ICU PRs found no competing implementation of these exports.

After rebasing onto main with the filtered-normalizer implementation, guest_icu_normalization and guest_socket_stream_options both passed on Windows x64 (GCC 15.2, Ninja, Release). The two local resource blobs match the pinned ICU submodule's input files. The rebased branch preserves the filtered-normalizer code and the corrected export inventory count.

The Windows job on the earlier head passed guest_icu_normalization and timed out in guest_ces_wide and guest_ces_wide_module. Rebased to include #19618, which reverts the CES change that caused the timeouts. All three tests passed locally on Windows (GCC 15.2, Ninja, Release) on ae8da40cf5.

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 and the licence notice of code adapted from upstream (see AGENTS.md)
  • 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:5292794234 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/19413). Originally posted by [THEMANnt](https://github.com/THEMANnt) on 2026-11-13T08:52:37Z. --- ### What Build the pinned ICU compatibility data into the existing ICU common library and expose the NFKC, NFKD, NFKC casefold and FC_NFKC_Closure guest exports. The implementation uses the upstream normalizer and needs neither an external runtime file nor a new dependency. ### Tested Windows x64 (GCC 15.2.0 MinGW, Ninja, Release) on head `4aab85ea2d`. `guest_icu_normalization`, `guest_icu_properties`, and all five `guest_icu_default_locale_*` cases each passed three consecutive runs. Conventions and whitespace checks passed. Windows (GCC 15.2.0 MinGW, Ninja, Release) on `ffedfcf6be`. Passed `guest_icu_normalization` and `guest_icu_properties`. The new coverage verifies instance lookup, compatibility decomposition and composition, removal of a default ignorable during casefold and a nonempty closure mapping. Conventions and whitespace checks passed. The overlap tool hit a GitHub API EOF. Exact export searches and comparison with the broad ICU PRs found no competing implementation of these exports. After rebasing onto main with the filtered-normalizer implementation, `guest_icu_normalization` and `guest_socket_stream_options` both passed on Windows x64 (GCC 15.2, Ninja, Release). The two local resource blobs match [the pinned ICU submodule's input files](https://github.com/unicode-org/icu/tree/049e0d6a420629ac7db77256987d083a563287b5/icu4c/source/data/in). The rebased branch preserves the filtered-normalizer code and the corrected export inventory count. The Windows job on the earlier head passed `guest_icu_normalization` and timed out in `guest_ces_wide` and `guest_ces_wide_module`. Rebased to include [#19618](https://github.com/boykopovar/AnyPS5/pull/19618), which reverts the CES change that caused the timeouts. All three tests passed locally on Windows (GCC 15.2, Ninja, Release) on `ae8da40cf5`. <!-- 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. --> ### 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) and the licence notice of code adapted from upstream (see AGENTS.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 -->
MarcZX10 commented 2026-11-13 09:08:33 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-13T09:08:33Z.

Review: CHANGES_REQUESTED


Reviewed — changes requested

The generated compatibility data does not have a verified source in the pinned repository, so the new CMake configure step cannot read its declared inputs.

What I ran

Reviewed head ffedfcf6be0202f641290c24ab28a922bccd3546 and the supplied diff. No build or tests were run. repo_read.py was used to inspect the changed lines and check the referenced ICU data directory.

Results

Check Result Note
Diff and changed code passed Read all changed lines
ICU data input paths failed Declared inputs were not found
Build and tests not run Author-reported only

Findings

Blocking

  • cmake/Icu.cmake:9 — The configure step reads 3rdparty/icu/icu4c/source/data/in/nfkc.nrm and nfkc_cf.nrm, but the pinned repository’s corresponding data/in directory contains no files. Thus CMake’s file(READ ...) cannot generate the embedded common data, blocking configuration for this build. Include the required data files in the pinned ICU source or generate them from files that are present.

Non-blocking

None.

Not verified

No build, tests, or console behavior were run. The author reports Windows GCC 15.2.0 tests, but these were not independently run. All changed files were read; no changed files were excluded.

To get this to a good state

Provide the two .nrm inputs at the paths used by CMake (or update generation to use available inputs), then rerun configuration and the reported normalization tests on the new head.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5888566225 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/19413#pullrequestreview-5888566225). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-11-13T09:08:33Z. **Review:** CHANGES_REQUESTED --- # Reviewed — changes requested The generated compatibility data does not have a verified source in the pinned repository, so the new CMake configure step cannot read its declared inputs. ## What I ran Reviewed head `ffedfcf6be0202f641290c24ab28a922bccd3546` and the supplied diff. No build or tests were run. `repo_read.py` was used to inspect the changed lines and check the referenced ICU data directory. ## Results | Check | Result | Note | |---|---|---| | Diff and changed code | passed | Read all changed lines | | ICU data input paths | failed | Declared inputs were not found | | Build and tests | not run | Author-reported only | ## Findings ### Blocking - `cmake/Icu.cmake:9` — The configure step reads `3rdparty/icu/icu4c/source/data/in/nfkc.nrm` and `nfkc_cf.nrm`, but the pinned repository’s corresponding `data/in` directory contains no files. Thus CMake’s `file(READ ...)` cannot generate the embedded common data, blocking configuration for this build. Include the required data files in the pinned ICU source or generate them from files that are present. ### Non-blocking None. ## Not verified No build, tests, or console behavior were run. The author reports Windows GCC 15.2.0 tests, but these were not independently run. All changed files were read; no changed files were excluded. ## To get this to a good state Provide the two `.nrm` inputs at the paths used by CMake (or update generation to use available inputs), then rerun configuration and the reported normalization tests on the new head.
MarcZX10 commented 2026-11-13 22:31:00 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-13T22:31:00Z.

Review: APPROVED


Reviewed — looks good

The reviewed changes implement compatibility normalization using pinned ICU data; I found no verified blocking defect in the inspected code.

What I ran

Reviewed head ae8da40cf5b3a52b3972e72572cbd52b7c18a94 using the prepared review bundle and the pinned repository reader, repo_read.py. I did not run build or test commands; reported Windows test results are author-supplied.

Results

Check Result Note
Source review passed Changed code and relevant context inspected
Build and tests not run Windows results reported by author

Findings

Blocking

None.

Non-blocking

None.

Not verified

Build/test results, console behavior, and full contents of large export files were not independently verified. The manifest lists 11 changed files under reviewed, all marked included; I read the changed code and relevant ranges, not the complete 9,925-line LegacyExports.cpp or complete export inventory files. No files were excluded by the prepared file listing.

To get this to a good state

Nothing is required.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5898961763 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/19413#pullrequestreview-5898961763). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-11-13T22:31:00Z. **Review:** APPROVED --- # Reviewed — looks good The reviewed changes implement compatibility normalization using pinned ICU data; I found no verified blocking defect in the inspected code. ## What I ran Reviewed head `ae8da40cf5b3a52b3972e72572cbd52b7c18a94` using the prepared review bundle and the pinned repository reader, `repo_read.py`. I did not run build or test commands; reported Windows test results are author-supplied. ## Results | Check | Result | Note | | --- | --- | --- | | Source review | passed | Changed code and relevant context inspected | | Build and tests | not run | Windows results reported by author | ## Findings ### Blocking None. ### Non-blocking None. ## Not verified Build/test results, console behavior, and full contents of large export files were not independently verified. The manifest lists 11 changed files under `reviewed`, all marked included; I read the changed code and relevant ranges, not the complete 9,925-line `LegacyExports.cpp` or complete export inventory files. No files were excluded by the prepared file listing. ## To get this to a good state Nothing is required.
MarcZX10 commented 2026-11-15 19:23:07 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-15T19:23:07Z.

Review: APPROVED


Reviewed — looks good

Nothing blocks this change; the review is complete at the available source level, with author-reported tests not rerun.

What I ran

Reviewed head 95f7c144a5089b32eff23a73438b26850f0ea9b0 using the pinned repository reader repo_read.py. No build or tests were run. The description reports successful Windows tests on earlier heads; those results were not independently verified here.

Results

Check Result Note
Changed source review passed All 11 changed files read
Build and tests not run Author-reported results only
Console behavior not run Debt entry records this limitation

Findings

Blocking

None.

Non-blocking

None.

Not verified

No build, tests, or console run was performed. The report's Windows test results refer to earlier heads, not the reviewed SHA. files.json was not available as a separate review document; the reader's file listing and manifest.json indicate that all 11 changed files are included. The ICU data directory listing returned no files, so the two .nrm inputs were not independently inspected. Repository files read: cmake/Icu.cmake, cmake/IcuNormalizationData.cpp.in, core/libs/prx/libSceIcu/Export.cpp, core/libs/prx/libSceIcu/Identified.hpp, core/libs/prx/libSceIcu/LegacyExports.cpp, core/libs/prx/libSceIcu/Normalization.cpp, core/libs/prx/libSceIcu/Normalization.hpp, core/libs/prx/libSceIcu/include/InventoryExports.hpp, core/libs/prx/libSceIcu/include/LegacyExports.hpp, core/libs/prx/libSceIcu/tests/Normalization.cpp, and docs/dev/debt/changes/feat-icu-compatibility-normalization.md. Prepared documents read: description.md, commits.md, manifest.json, and diff.patch.

To get this to a good state

Nothing is required.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5912431449 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/19413#pullrequestreview-5912431449). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-11-15T19:23:07Z. **Review:** APPROVED --- # Reviewed — looks good Nothing blocks this change; the review is complete at the available source level, with author-reported tests not rerun. ## What I ran Reviewed head `95f7c144a5089b32eff23a73438b26850f0ea9b0` using the pinned repository reader `repo_read.py`. No build or tests were run. The description reports successful Windows tests on earlier heads; those results were not independently verified here. ## Results | Check | Result | Note | |---|---|---| | Changed source review | passed | All 11 changed files read | | Build and tests | not run | Author-reported results only | | Console behavior | not run | Debt entry records this limitation | ## Findings ### Blocking None. ### Non-blocking None. ## Not verified No build, tests, or console run was performed. The report's Windows test results refer to earlier heads, not the reviewed SHA. `files.json` was not available as a separate review document; the reader's file listing and `manifest.json` indicate that all 11 changed files are included. The ICU data directory listing returned no files, so the two `.nrm` inputs were not independently inspected. Repository files read: `cmake/Icu.cmake`, `cmake/IcuNormalizationData.cpp.in`, `core/libs/prx/libSceIcu/Export.cpp`, `core/libs/prx/libSceIcu/Identified.hpp`, `core/libs/prx/libSceIcu/LegacyExports.cpp`, `core/libs/prx/libSceIcu/Normalization.cpp`, `core/libs/prx/libSceIcu/Normalization.hpp`, `core/libs/prx/libSceIcu/include/InventoryExports.hpp`, `core/libs/prx/libSceIcu/include/LegacyExports.hpp`, `core/libs/prx/libSceIcu/tests/Normalization.cpp`, and `docs/dev/debt/changes/feat-icu-compatibility-normalization.md`. Prepared documents read: `description.md`, `commits.md`, `manifest.json`, and `diff.patch`. ## To get this to a good state Nothing is required.
MarcZX10 commented 2026-11-16 06:17:05 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-16T06:17:05Z.

Review: COMMENTED


Reviewed — no blocking findings

The implementation and all changed files were reviewed at head 4aab85ea2d9753374529f8c4507f6fd2d7898a3a; no checks were run in this session, so a formal approval is not justified.

What I ran

No commands or tests were run. I reviewed the prepared diff and targeted source context using repo_read.py.

Results

Check Result Note
Code review passed All changed files were included and reviewed
Tests and build not run Only author-reported results are available

Findings

Blocking

None.

Non-blocking

None.

Not verified

Build and test results were not independently verified. The description reports Windows test runs on earlier heads; those results do not establish a run on this reviewed head. Console behavior is also unverified, as documented in the change.

Read: cmake/Icu.cmake, cmake/IcuNormalizationData.cpp.in, core/libs/prx/libSceIcu/Export.cpp, core/libs/prx/libSceIcu/Identified.hpp, core/libs/prx/libSceIcu/LegacyExports.cpp, core/libs/prx/libSceIcu/Normalization.cpp, core/libs/prx/libSceIcu/Normalization.hpp, core/libs/prx/libSceIcu/include/InventoryExports.hpp, core/libs/prx/libSceIcu/include/LegacyExports.hpp, core/libs/prx/libSceIcu/tests/Normalization.cpp, and docs/dev/debt/changes/feat-icu-compatibility-normalization.md. All changed files listed in the manifest were included. review/files.json was unavailable.

To get this to a good state

Nothing is required. Optional: run the build and tests on this exact head.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5915776291 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/19413#pullrequestreview-5915776291). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-11-16T06:17:05Z. **Review:** COMMENTED --- # Reviewed — no blocking findings The implementation and all changed files were reviewed at head `4aab85ea2d9753374529f8c4507f6fd2d7898a3a`; no checks were run in this session, so a formal approval is not justified. ## What I ran No commands or tests were run. I reviewed the prepared diff and targeted source context using `repo_read.py`. ## Results | Check | Result | Note | |---|---|---| | Code review | passed | All changed files were included and reviewed | | Tests and build | not run | Only author-reported results are available | ## Findings ### Blocking None. ### Non-blocking None. ## Not verified Build and test results were not independently verified. The description reports Windows test runs on earlier heads; those results do not establish a run on this reviewed head. Console behavior is also unverified, as documented in the change. Read: `cmake/Icu.cmake`, `cmake/IcuNormalizationData.cpp.in`, `core/libs/prx/libSceIcu/Export.cpp`, `core/libs/prx/libSceIcu/Identified.hpp`, `core/libs/prx/libSceIcu/LegacyExports.cpp`, `core/libs/prx/libSceIcu/Normalization.cpp`, `core/libs/prx/libSceIcu/Normalization.hpp`, `core/libs/prx/libSceIcu/include/InventoryExports.hpp`, `core/libs/prx/libSceIcu/include/LegacyExports.hpp`, `core/libs/prx/libSceIcu/tests/Normalization.cpp`, and `docs/dev/debt/changes/feat-icu-compatibility-normalization.md`. All changed files listed in the manifest were included. `review/files.json` was unavailable. ## To get this to a good state Nothing is required. Optional: run the build and tests on this exact head.

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!19413
No description provided.