feat(libSceJson2): implement sce::Json::Object::empty #2004

Merged
NahuelGenchi merged 1 commit from upstream-pr/2004 into main 2026-10-09 08:02:57 +00:00
NahuelGenchi commented 2026-10-09 04:52:25 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by NahuelGenchi on 2026-10-09T04:52:25Z.


What

Implements sce::Json::Object::empty() const (_ZNK3sce4Json6Object5emptyEv, NID i2l3IYvQ9UE) in libSceJson2, next to Object::size(), the same way Array::empty() and String::empty() are implemented. The name comes from tools/nid_names.py, which checks it against the NID hash.

Sonic Origins (PPSA05324) imports it from libSceJson2. On main, the relinked title stops at startup with symbol lookup error: undefined symbol: i2l3IYvQ9UE, and tools/import_audit.py lists it as the title's only absent import.

Tested

Ubuntu 26.04, GCC 15.2, Release build, AMD Radeon R9 380 (RADV, Mesa 26.0.8).

  • guest_json_tests passes. It now also checks that a new object is empty and that it is no longer empty once operator[] has inserted a key.
  • PPSA05324 v02.002.000:
    • import_audit.py: 1 absent import (this one) before, 0 after.
    • On main, the title exits with code 127 at the symbol lookup above. With this change it loads, starts its threads and creates the Vulkan device. It then stops 7 s in at ShaderRecompiler::Recompile: shader image heap capacity exceeded (#1789).
  • tools/check_conventions.py --base origin/main passes.

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 in TechnicalDebt
  • 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
  • AI-assisted: yes (Claude Code)

🤖 Generated with Claude Code

<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4796133722 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/2004). Originally posted by [NahuelGenchi](https://github.com/NahuelGenchi) on 2026-10-09T04:52:25Z. --- ### What Implements `sce::Json::Object::empty() const` (`_ZNK3sce4Json6Object5emptyEv`, NID `i2l3IYvQ9UE`) in libSceJson2, next to `Object::size()`, the same way `Array::empty()` and `String::empty()` are implemented. The name comes from `tools/nid_names.py`, which checks it against the NID hash. Sonic Origins (PPSA05324) imports it from libSceJson2. On `main`, the relinked title stops at startup with `symbol lookup error: undefined symbol: i2l3IYvQ9UE`, and `tools/import_audit.py` lists it as the title's only absent import. ### Tested Ubuntu 26.04, GCC 15.2, Release build, AMD Radeon R9 380 (RADV, Mesa 26.0.8). - `guest_json_tests` passes. It now also checks that a new object is empty and that it is no longer empty once `operator[]` has inserted a key. - PPSA05324 v02.002.000: - `import_audit.py`: 1 absent import (this one) before, 0 after. - On `main`, the title exits with code 127 at the symbol lookup above. With this change it loads, starts its threads and creates the Vulkan device. It then stops 7 s in at `ShaderRecompiler::Recompile: shader image heap capacity exceeded` (#1789). - `tools/check_conventions.py --base origin/main` passes. ### 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 in [TechnicalDebt](https://github.com/boykopovar/AnyPS5/blob/main/docs/dev/TechnicalDebt.md#silent-stubs) - [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 - [x] AI-assisted: yes (Claude Code) 🤖 Generated with [Claude Code](https://claude.com/claude-code)
github-actions[bot] commented 2026-10-09 04:52:46 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-09T04:52:46Z.


Progress report (f145139 → b9d7ff4)

➖ System libraries: 84.76% (+0.0%, +1 implemented functions)

✅ 1 implemented
Library Name
libSceJson2 _ZNK3sce4Json6Object5emptyEv
<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6074517944 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/2004#issuecomment-6074517944). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-10-09T04:52:46Z. --- <!-- progress-report --> ### Progress report (f145139 → b9d7ff4) ➖ **System libraries**: 84.76% (+0.0%, +1 implemented functions) <details> <summary>✅ 1 implemented</summary> | Library | Name | | - | - | | libSceJson2 | `_ZNK3sce4Json6Object5emptyEv` | </details>
MarcZX10 commented 2026-10-09 05:16:34 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-09T05:16:34Z.

Review: APPROVED


Reviewed the full two-file diff at b9d7ff46d26cdf3eb9f7beb622a46330b8ef06cd. The export uses the same items->empty() operation as Array::empty() and adds focused coverage for empty and populated objects. The NID database confirms i2l3IYvQ9UE maps to _ZNK3sce4Json6Object5emptyEv.

The Linux, Windows, changes and conventions checks pass on this head. I found no blocking issue.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5465991585 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/2004#pullrequestreview-5465991585). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-09T05:16:34Z. **Review:** APPROVED --- Reviewed the full two-file diff at `b9d7ff46d26cdf3eb9f7beb622a46330b8ef06cd`. The export uses the same `items->empty()` operation as `Array::empty()` and adds focused coverage for empty and populated objects. The NID database confirms `i2l3IYvQ9UE` maps to `_ZNK3sce4Json6Object5emptyEv`. The Linux, Windows, changes and conventions checks pass on this head. I found no blocking issue.
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!2004
No description provided.