feat(libSceJson2): implement sce::Json::Array::pop_front #9628
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/9628"
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 JJenkx on 2026-10-22T05:02:59Z.
What
This PR implements
sce::Json::Array::pop_front()(_ZN3sce4Json5Array9pop_frontEv, NIDpPs3qZTZQvQ) in libSceJson2.Why: Graven (PPSA09614) imports it from one call site in its executable. No built library exports it, so
tools/import_audit.pylists it as absent, and the loader stops before the title starts.Behaviour:
cleardoes for every element.std::out_of_range, asfrontandbackdo here.Tested
guest_jsonnow pops both elements of a two-element copy, checks the remaining element and the empty array, and expects the throw on a third pop. It passes, as doguest_json_copy_failure,param_json_parserandparam_json_utf8.eboot.binandsce_module/*.prxand converted them withrelinker --windows --registry.mainthe audit reportsabsent 1(pPs3qZTZQvQ) and exits 1. With this PR it reportsabsent 0and exits 0.tools/check_conventions.pypasses.Checklist
main; no other open PR implements the same functionsNotImplemented_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 harisibrar1 on 2026-10-22T06:01:40Z.
Review: APPROVED
Checked against main
4a17c7175and the NID calculator:_ZN3sce4Json5Array9pop_frontEvcomputes topPs3qZTZQvQ, as the description says.Destroyon the frontValuefollowed bystd::list::pop_frontfrees the node and anything nested in it, the same waycleardoes. Because the storage is astd::list, iterators to the other elements, including the storedend, stay valid.frontandbackand is recorded in the debt file. The tests cover both pops and the empty case.Reviewed with AI assistance (Claude Code); the checks above were run locally on my machine.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-22T09:23:32Z.
Review: CHANGES_REQUESTED
The implementation removes and destroys the front list value, matching
clear’s ownership behavior; the NID/name and signature have independent review confirmation. The test covers both pops, remaining contents and the empty-array throw. The PR reports a useful current-main title-specific import audit: Graven (PPSA09614) has one absent import on main and none on this PR, though the title itself has not yet been run. Current-head conventions/eligibility/intake/labels/report checks pass; product test jobs were skipped. I ran current-main conventions andgit diff --check; both pass. I did not rerun the Windows runtime test.I could not find an existing Game bring-up discussion for PPSA09614/Graven in the repository’s first 100 discussions. CONTRIBUTING requires title fixes to link the title’s Game bring-up discussion and keep its open-PR list current. Please create or locate the appropriate discussion, add this PR and the remaining 41 throwing imports as needed, then link it in the
Unblockschecklist. This is the outstanding repository-rule item before merge.Imported from boykopovar/AnyPS5. Originally posted by JJenkx on 2026-10-22T09:30:15Z.
Thanks @MarcZX10. I created the Game bring-up discussion, #9708, and linked it on the
Unblocksline (PPSA09614 #9708). It lists this PR as the one open PR the title needs. It also lists the 28 functions behind the audit's 41 throwing import entries, grouped by library, with #9059 noted for__tls_get_addr. It says plainly that Graven hasn't been launched yet: everything in it comes from the import audit, so whether the title reaches any of the throwing imports is unknown until a run.Imported from boykopovar/AnyPS5. Originally posted by JJenkx on 2026-10-22T10:03:30Z.
Rebased onto current
maincc0078595d(it was 63 commits behind); the new head is bf2eb26bec, with no conflicts. On Windows (WinLibs GCC 15.2.0 r7, Release), the JSON tests (guest_jsonand the three others matchingjson) pass three times out of three on the rebased head. Graven's (PPSA09614) import audit with these libraries still reportsabsent 0. Onmainit reports 1,pPs3qZTZQvQ.Imported from boykopovar/AnyPS5. Originally posted by JJenkx on 2026-10-22T12:14:34Z.
Rebased onto
main8b3a6ba88d. The only conflict was the neighbouringdocs/dev/debt/libSceJson2.mdentry for real-number conversion, and both entries are kept.guest_json,guest_json_numeric_locale,guest_json_copy_failure,param_json_parserandparam_json_utf8pass, as doestools/check_conventions.py(Windows, UCRT GCC 15.2, Release).Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-22T12:59:47Z.
Review: APPROVED
The requested title-tracking item is resolved: #9708 is a Game bring-up discussion for PPSA09614, links this PR as the absent-import fix, records that the title has not been launched, and lists the remaining throwing imports without asserting they are runtime stops. The PR is based on current
mainand its checklist linksUnblocks: PPSA09614 #9708.I independently compiled the exact PR
Export.cppandGuestJson.cpptogether on Linux (with a smallNotImplemented_nid_no_patchstub for unreachable unrelated exports); the completeguest_jsonexecutable passed. Exact-head diff-check, conventions against currentmain, and test registration (171 scripts) also pass. The PR reports Windows focused JSON tests passing three times and the Graven import audit changing from one absent symbol on main to zero on this PR. Hosted product jobs are skipped by path filters, and I did not run Graven itself.I also ran the direct-source test under ASan/UBSan. LeakSanitizer reports 48 bytes from three iterator allocations in the existing
GuestJsontest; compiling and running the unchanged current-mainExport.cppandGuestJson.cppproduces the same three allocations and byte count. No new sanitizer finding appeared in the pop-front path. The PR’s implementation and empty-array limitation are documented, and I found no remaining blocker. Approved.