feat(libfreetype): expose error strings #16632

Merged
DonRyuzaki merged 11 commits from upstream-pr/16632 into main 2026-11-18 21:13:12 +00:00
DonRyuzaki commented 2026-11-07 10:52:04 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by DonRyuzaki on 2026-11-07T10:52:04Z.


What

Implement FT_Error_String (NID boXwTAWsas0) using the FreeType library linked by the runtime. Bundled FreeType 2.15.0 enables error descriptions; valid codes return its static descriptions and invalid codes return null. Optional system-dependency builds follow the installed FreeType configuration, which may omit descriptions. Console version, signature, and exact strings are unmeasured. No title unblock is claimed.

Tested

Documentation correction (15 November 2026): current head 4107995e190d5112ce007d029d5d0f16ebcad524 changes only docs/dev/debt/libfreetype.md from 6c0f195c1e0317ee7595242f9e402e7af28e2db6. One current-main Older callable NIDs bullet remains; the implemented FT_Error_String is removed from that debt inventory. The local tree used for git diff --check upstream/main HEAD and python3 tools/check_conventions.py --base upstream/main matches this pushed head's tree 7d65827e4903e7f44a24ff1a1ebe8f906c6c2315. The convention checker passed without findings. Focused runtime tests were not rerun for this documentation-only commit; the build and test evidence below remains pinned to its stated older heads. See Checks for hosted CI on the new head.

Previous refresh (15 November 2026): head 6c0f195c1e0317ee7595242f9e402e7af28e2db6 includes upstream main eef73731fc926d18e3e8b19849ed42511a1adb09 and merged #20844, which fixes the shared ICU test linker error that caused the preceding Windows Build failure. This PR’s patch relative to main remains confined to its intended files. The diff check and tools/check_conventions.py passed on that head. The libfreetype library compiled and linked on prior head 73103887b4580069208313ed09407becab0599a8, and its PRX exported FT_Error_String_nid_postfix. The full metadata test on that prior head was blocked by an unrelated SQLite Tcl header generator error; the 24 passing test executions below are from an earlier stated head. That head's Build, Progress report, and Emscripten portability workflows passed; previous evidence below applies to its stated older heads.

Merged upstream main b4a82720a82c4885b0a81d3f63f3076e7527e4a0; validated head 4be126a17654a7b57a5f721e755d515ff6b1c1e3. The conflict resolution keeps upstream's FT_Stream_OpenBzip2 implementation/declaration and replaces only the error-string placeholder with FT_Error_String. Both the bzip2 and error-string debt entries are retained; unrelated debt bytes match the pinned main after removing this PR's intended edits.

  • git diff --check and tools/check_conventions.py against the pinned base, including this PR title/body: passed.
  • Ubuntu 24.04 WSL2 x86-64, GCC 13.3.0, CMake 3.28.3, Ninja, Release, bundled dependencies, BUILD_TESTING=ON, eight compiler jobs. The full runtime library target (libs) and the focused test executables/fixtures built successfully. The shared cache has FT_ENABLE_ERROR_STRINGS=ON; no system-dependency build was tested.
  • Linux validation used a tree-identical overlay of this head on the pinned base: git write-tree matched 6c674c6a9d24e1471c77f96178c1b15f6502d4cf before and after testing.
  • public_headers, guest_legacy_freetype_gzip, guest_legacy_freetype_lzw, guest_legacy_freetype_bzip2, guest_legacy_freetype_metadata, guest_legacy_freetype_metadata_nid, guest_legacy_freetype_library, guest_legacy_freetype_library_nid each passed three consecutive CTest runs: 24/24 executions, no skips; 47.79 seconds combined CTest wall time.
  • The metadata tests load the error-string export by both its symbol name and NID and compare valid/invalid codes with the bundled backend. Stream tests cover upstream gzip, LZW and bzip2 paths; library tests preserve default-property coverage.
  • SHA-256: unpatched libfreetype.prx 89de4de0b6cd520753dcdcfa25aadf7660b910af1db131241eddd8fa4a13ee33; NID-patched 3e32ffd5e2cba6a1e626b421def700f3600b623dada50e951106af385124246d.

These are local results on the stated head. See Checks for fresh hosted CI. No full CTest suite, local Windows/macOS build, console, game or GPU execution was run for this update.

Previous merge validation, with its original source pins

The following results describe the earlier head and were not repeated on those old pins for this update.

Merged upstream main 131485150aa0162dc50bc406b0384b3b865c94b8; head 6c25c18afe8c8f1fa2b3a2f84324008aebf9553d. The include/debt conflicts are resolved while retaining upstream's merged FT_Set_Default_Properties implementation (#16627), its guest-environment behavior and tests, and FT_Library_SetLcdGeometry. This PR still replaces only the error-string placeholder.

  • git diff --check upstream/main HEAD and tools/check_conventions.py --base upstream/main: passed without findings.
  • Ubuntu 24.04 WSL2, GCC 13.3.0, CMake 3.28.3, Ninja 1.11.1, Release, bundled dependencies, BUILD_TESTING=ON: the full runtime library target (libs), guest_legacy_freetype_metadata_tests, guest_legacy_freetype_library_tests and the NID-patched library fixture built successfully with two jobs.
  • Linux validation used a tree-identical overlay of this head on the pinned base: git write-tree matched 519153807bc16fcc39f95ffeecd4b601464d24a3 before and after testing.
  • guest_legacy_freetype_metadata, guest_legacy_freetype_metadata_nid, guest_legacy_freetype_library, guest_legacy_freetype_library_nid and public_headers each passed three consecutive CTest runs: 15/15 executions, no skips; 44.21 seconds combined CTest wall time. Metadata tests exercise error strings through both symbol names and NIDs; library tests retain coverage of the upstream default-property path.
  • SHA-256: unpatched libfreetype.prx 3fb688d80164651b66e631db5e3ff1cd22931c5d46dffd64ce2ef3470d602d00; NID-patched 625c93aea1b4c2b03b38fd0a3180b9d1d180abb5e925e63fb4e0b886937704d1.

These are the new local results; see Checks for hosted CI. No full CTest suite, local Windows/macOS focused test, console, retail-title or system-dependency build test was run for this update. JJenkx's earlier Windows result applies to its stated older head, not this merge.

Checklist

  • Based on current main; no other open PR implements the same function
  • One topic per PR; follow-ups go in a new PR
  • No comments in code except technical debt
  • Unimplemented paths throw; no silent stub added
  • No notes, investigation Markdown files or images added to the repository
  • New third-party code is a submodule built from source (none added)
  • Generic behaviour, not specific to one title
  • Depends on: none
  • Fixes: none
  • Unblocks: none
  • GPUs tested: n/a
  • AI-assisted: yes (Codex)
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:5200864983 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/16632). Originally posted by [DonRyuzaki](https://github.com/DonRyuzaki) on 2026-11-07T10:52:04Z. --- ### What Implement `FT_Error_String` (NID `boXwTAWsas0`) using the FreeType library linked by the runtime. Bundled FreeType 2.15.0 enables error descriptions; valid codes return its static descriptions and invalid codes return null. Optional system-dependency builds follow the installed FreeType configuration, which may omit descriptions. Console version, signature, and exact strings are unmeasured. No title unblock is claimed. ### Tested **Documentation correction (15 November 2026):** current head `4107995e190d5112ce007d029d5d0f16ebcad524` changes only `docs/dev/debt/libfreetype.md` from `6c0f195c1e0317ee7595242f9e402e7af28e2db6`. One current-main `Older callable NIDs` bullet remains; the implemented `FT_Error_String` is removed from that debt inventory. The local tree used for `git diff --check upstream/main HEAD` and `python3 tools/check_conventions.py --base upstream/main` matches this pushed head's tree `7d65827e4903e7f44a24ff1a1ebe8f906c6c2315`. The convention checker passed without findings. Focused runtime tests were not rerun for this documentation-only commit; the build and test evidence below remains pinned to its stated older heads. See Checks for hosted CI on the new head. **Previous refresh (15 November 2026):** head `6c0f195c1e0317ee7595242f9e402e7af28e2db6` includes upstream main `eef73731fc926d18e3e8b19849ed42511a1adb09` and merged [#20844](https://github.com/boykopovar/AnyPS5/pull/20844), which fixes the shared ICU test linker error that caused the preceding Windows Build failure. This PR’s patch relative to main remains confined to its intended files. The diff check and `tools/check_conventions.py` passed on that head. The `libfreetype` library compiled and linked on prior head `73103887b4580069208313ed09407becab0599a8`, and its PRX exported `FT_Error_String_nid_postfix`. The full metadata test on that prior head was blocked by an unrelated SQLite Tcl header generator error; the 24 passing test executions below are from an earlier stated head. That head's [Build](https://github.com/boykopovar/AnyPS5/actions/runs/43745211108), Progress report, and Emscripten portability workflows passed; previous evidence below applies to its stated older heads. Merged upstream main `b4a82720a82c4885b0a81d3f63f3076e7527e4a0`; validated head `4be126a17654a7b57a5f721e755d515ff6b1c1e3`. The conflict resolution keeps upstream's `FT_Stream_OpenBzip2` implementation/declaration and replaces only the error-string placeholder with `FT_Error_String`. Both the bzip2 and error-string debt entries are retained; unrelated debt bytes match the pinned main after removing this PR's intended edits. - `git diff --check` and `tools/check_conventions.py` against the pinned base, including this PR title/body: passed. - Ubuntu 24.04 WSL2 x86-64, GCC 13.3.0, CMake 3.28.3, Ninja, Release, bundled dependencies, `BUILD_TESTING=ON`, eight compiler jobs. The full runtime library target (`libs`) and the focused test executables/fixtures built successfully. The shared cache has `FT_ENABLE_ERROR_STRINGS=ON`; no system-dependency build was tested. - Linux validation used a tree-identical overlay of this head on the pinned base: `git write-tree` matched `6c674c6a9d24e1471c77f96178c1b15f6502d4cf` before and after testing. - `public_headers`, `guest_legacy_freetype_gzip`, `guest_legacy_freetype_lzw`, `guest_legacy_freetype_bzip2`, `guest_legacy_freetype_metadata`, `guest_legacy_freetype_metadata_nid`, `guest_legacy_freetype_library`, `guest_legacy_freetype_library_nid` each passed three consecutive CTest runs: **24/24 executions**, no skips; 47.79 seconds combined CTest wall time. - The metadata tests load the error-string export by both its symbol name and NID and compare valid/invalid codes with the bundled backend. Stream tests cover upstream gzip, LZW and bzip2 paths; library tests preserve default-property coverage. - SHA-256: unpatched `libfreetype.prx` `89de4de0b6cd520753dcdcfa25aadf7660b910af1db131241eddd8fa4a13ee33`; NID-patched `3e32ffd5e2cba6a1e626b421def700f3600b623dada50e951106af385124246d`. These are local results on the stated head. See Checks for fresh hosted CI. No full CTest suite, local Windows/macOS build, console, game or GPU execution was run for this update. <details> <summary>Previous merge validation, with its original source pins</summary> The following results describe the earlier head and were not repeated on those old pins for this update. Merged upstream main `131485150aa0162dc50bc406b0384b3b865c94b8`; head `6c25c18afe8c8f1fa2b3a2f84324008aebf9553d`. The include/debt conflicts are resolved while retaining upstream's merged `FT_Set_Default_Properties` implementation (#16627), its guest-environment behavior and tests, and `FT_Library_SetLcdGeometry`. This PR still replaces only the error-string placeholder. - `git diff --check upstream/main HEAD` and `tools/check_conventions.py --base upstream/main`: passed without findings. - Ubuntu 24.04 WSL2, GCC 13.3.0, CMake 3.28.3, Ninja 1.11.1, Release, bundled dependencies, `BUILD_TESTING=ON`: the full runtime library target (`libs`), `guest_legacy_freetype_metadata_tests`, `guest_legacy_freetype_library_tests` and the NID-patched library fixture built successfully with two jobs. - Linux validation used a tree-identical overlay of this head on the pinned base: `git write-tree` matched `519153807bc16fcc39f95ffeecd4b601464d24a3` before and after testing. - `guest_legacy_freetype_metadata`, `guest_legacy_freetype_metadata_nid`, `guest_legacy_freetype_library`, `guest_legacy_freetype_library_nid` and `public_headers` each passed three consecutive CTest runs: 15/15 executions, no skips; 44.21 seconds combined CTest wall time. Metadata tests exercise error strings through both symbol names and NIDs; library tests retain coverage of the upstream default-property path. - SHA-256: unpatched `libfreetype.prx` `3fb688d80164651b66e631db5e3ff1cd22931c5d46dffd64ce2ef3470d602d00`; NID-patched `625c93aea1b4c2b03b38fd0a3180b9d1d180abb5e925e63fb4e0b886937704d1`. These are the new local results; see Checks for hosted CI. No full CTest suite, local Windows/macOS focused test, console, retail-title or system-dependency build test was run for this update. [JJenkx's earlier Windows result](https://github.com/boykopovar/AnyPS5/pull/16632#issuecomment-6706053582) applies to its stated older head, not this merge. </details> ### Checklist - [x] Based on current main; no other open PR implements the same function - [x] One topic per PR; follow-ups go in a new PR - [x] No comments in code except technical debt - [x] Unimplemented paths throw; no silent stub added - [x] No notes, investigation Markdown files or images added to the repository - [x] New third-party code is a submodule built from source (none added) - [x] Generic behaviour, not specific to one title - [x] Depends on: none - [x] Fixes: none - [x] Unblocks: none - [x] GPUs tested: n/a - [x] AI-assisted: yes (Codex)
MarcZX10 commented 2026-11-18 05:21:53 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-18T05:21:53Z.

Review: APPROVED


Reviewed — looks good

Nothing blocks this documentation-only update; the current diff removes the implemented FT_Error_String from the callable-NID debt inventory and records it under functional debt.

What I ran

Reviewed head 4107995e190d5112ce007d029d5d0f16ebcad524 against base main using the prepared diff and pinned reader repo_read.py. No build or test commands were run.

Results

Check Result Note
Diff and changed-file review passed All six changed files included
Build and tests not run Current commit is documentation-only

Findings

Blocking

None.

Non-blocking

None.

Not verified

Earlier implementation and test evidence in the PR description is reported for older heads and was not independently rerun. Console behavior, console signature, and system-dependency build behavior remain unverified as described in the updated debt entry. files.json was not available; the review folder listing and manifest identify all six changed files as included, and their full texts were read.

To get this to a good state

Nothing is required.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5951222779 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/16632#pullrequestreview-5951222779). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-11-18T05:21:53Z. **Review:** APPROVED --- # Reviewed — looks good Nothing blocks this documentation-only update; the current diff removes the implemented `FT_Error_String` from the callable-NID debt inventory and records it under functional debt. ## What I ran Reviewed head `4107995e190d5112ce007d029d5d0f16ebcad524` against base `main` using the prepared diff and pinned reader `repo_read.py`. No build or test commands were run. ## Results | Check | Result | Note | |---|---|---| | Diff and changed-file review | passed | All six changed files included | | Build and tests | not run | Current commit is documentation-only | ## Findings ### Blocking None. ### Non-blocking None. ## Not verified Earlier implementation and test evidence in the PR description is reported for older heads and was not independently rerun. Console behavior, console signature, and system-dependency build behavior remain unverified as described in the updated debt entry. `files.json` was not available; the review folder listing and manifest identify all six changed files as included, and their full texts were read. ## To get this to a good state Nothing is required.
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!16632
No description provided.