fix(relinker): discover required modules in nested standard directories #1815

Merged
eliasbruno124-dev merged 1 commit from upstream-pr/1815 into main 2026-10-10 07:19:07 +00:00
eliasbruno124-dev commented 2026-10-08 20:16:00 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by eliasbruno124-dev on 2026-10-08T20:16:00Z.


What

Required providers under prx/shipping, sce_module/nested and sce_modules/nested are skipped because the required filename and declared-identity scans prune the standard module directories. An existing PPSA28038 / 17.661.002 input requests Party.prx and libPlayFabMultiplayer.prx supplied under prx/shipping.

Let those required-provider scans descend into the directories. Preserve immediate-child eager loading, filename/SONAME precedence, relative paths and ambiguity errors. Respect exclusions, including Windows physical casing, and ignore generated .guest.prx files. Unneeded unsupported module bodies remain unparsed. This adds no transitive/plugin discovery or lifecycle change.

Rebased as e2401a8dc08cec0a4773311bbe3a9ba8bd599e61, one commit on main f3999054bd4ee2cccc08aeb871142b8019e5d46d. #1503 and #1830 are already merged and are not included again in this PR's diff. The conflict resolution retains #1830's extension matching and shipped output names. Added integration cases cover extension matching in all three nested standard directories, ambiguous stems and excluded stem candidates. The plural-directory fixture creates only the valid standard directory.

Tested

Windows 11, MinGW-w64 GCC 15.2.0, Release, ANYPS5_RELINKER_ONLY=ON, final commit e2401a8d:

  • Build, conventions and git diff --check pass.
  • The complete local suite passes 58/59 registered groups. The upstream tls_function_coverage group times out at the unchanged 30-second limit. No timeout was raised; this is not a fully passing local suite.
  • guest_needed_modules passes in 1.28 s, guest_needed_nested_modules in 5.30 s, guest_module_identity in 8.44 s and guest_runpath in 0.93 s. Tests execute generated Windows programs and inspect Linux ELF dependencies; Linux/macOS native execution was not performed locally.
  • Negative control: restoring main's GuestModuleBuilder.cpp at 6635c7ab, while keeping the same regression, reproduces the missing nested provider artifact. Restoring the correction passes. That main file is byte-identical at the final base f3999054; the contribution patch is unchanged across the last rebase. Both rebuilds succeeded.
  • Historical original-input comparison on a3ec0083: the same 43 original code inputs with identical host libraries from 78dbe378 produced two missing provider files before the correction and none afterward. An earlier natural startup loaded Party/PlayFab and stopped at missing HTTP2 imports. These are earlier title observations, not a new game run on this rebase. No menu, gameplay or performance result is claimed.

The current PR-merge CI run passes the relinker jobs on Linux (63/63 groups), Windows (59/59) and macOS (56/56). These build e2401a8d merged into main 7ced89fd. TLS passes in 8.70 s, 9.91 s and 5.68 s respectively. Conventions also pass. The full-runtime Windows/Linux jobs are skipped by workflow eligibility; these are not full-runtime or title-playability results.

Overlap rechecked: open #1782 adds transitive discovery and still prunes standard directories; it does not implement this nested scan and is not included or required. #2100 is closed. The branch merges cleanly with main 6324b00b checked immediately before push; the discovery source is unchanged from the tested base.

Checklist

  • Based on pinned current main; existing solutions and overlaps checked
  • One topic per PR; no merge commits in the contribution range
  • No code comments added
  • Missing imports and unsupported paths still fail; no silent stubs
  • No investigation files, proprietary inputs or images added
  • No new third-party code
  • Generic behaviour
  • Depends on: none
  • AI-assisted: yes
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4792284904 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/1815). Originally posted by [eliasbruno124-dev](https://github.com/eliasbruno124-dev) on 2026-10-08T20:16:00Z. --- ### What Required providers under `prx/shipping`, `sce_module/nested` and `sce_modules/nested` are skipped because the required filename and declared-identity scans prune the standard module directories. An existing PPSA28038 / 17.661.002 input requests `Party.prx` and `libPlayFabMultiplayer.prx` supplied under `prx/shipping`. Let those required-provider scans descend into the directories. Preserve immediate-child eager loading, filename/SONAME precedence, relative paths and ambiguity errors. Respect exclusions, including Windows physical casing, and ignore generated `.guest.prx` files. Unneeded unsupported module bodies remain unparsed. This adds no transitive/plugin discovery or lifecycle change. Rebased as `e2401a8dc08cec0a4773311bbe3a9ba8bd599e61`, one commit on main `f3999054bd4ee2cccc08aeb871142b8019e5d46d`. #1503 and #1830 are already merged and are not included again in this PR's diff. The conflict resolution retains #1830's extension matching and shipped output names. Added integration cases cover extension matching in all three nested standard directories, ambiguous stems and excluded stem candidates. The plural-directory fixture creates only the valid standard directory. ### Tested Windows 11, MinGW-w64 GCC 15.2.0, Release, `ANYPS5_RELINKER_ONLY=ON`, final commit `e2401a8d`: - Build, conventions and `git diff --check` pass. - The complete local suite passes 58/59 registered groups. The upstream `tls_function_coverage` group times out at the unchanged 30-second limit. No timeout was raised; this is not a fully passing local suite. - `guest_needed_modules` passes in 1.28 s, `guest_needed_nested_modules` in 5.30 s, `guest_module_identity` in 8.44 s and `guest_runpath` in 0.93 s. Tests execute generated Windows programs and inspect Linux ELF dependencies; Linux/macOS native execution was not performed locally. - Negative control: restoring main's `GuestModuleBuilder.cpp` at `6635c7ab`, while keeping the same regression, reproduces the missing nested provider artifact. Restoring the correction passes. That main file is byte-identical at the final base `f3999054`; the contribution patch is unchanged across the last rebase. Both rebuilds succeeded. - Historical original-input comparison on `a3ec0083`: the same 43 original code inputs with identical host libraries from `78dbe378` produced two missing provider files before the correction and none afterward. An earlier natural startup loaded Party/PlayFab and stopped at missing HTTP2 imports. These are earlier title observations, not a new game run on this rebase. No menu, gameplay or performance result is claimed. The [current PR-merge CI run](https://github.com/boykopovar/AnyPS5/actions/runs/38029840095) passes the relinker jobs on Linux (63/63 groups), Windows (59/59) and macOS (56/56). These build `e2401a8d` merged into main `7ced89fd`. TLS passes in 8.70 s, 9.91 s and 5.68 s respectively. Conventions also pass. The full-runtime Windows/Linux jobs are skipped by workflow eligibility; these are not full-runtime or title-playability results. Overlap rechecked: open #1782 adds transitive discovery and still prunes standard directories; it does not implement this nested scan and is not included or required. #2100 is closed. The branch merges cleanly with main `6324b00b` checked immediately before push; the discovery source is unchanged from the tested base. ### Checklist - [x] Based on pinned current main; existing solutions and overlaps checked - [x] One topic per PR; no merge commits in the contribution range - [x] No code comments added - [x] Missing imports and unsupported paths still fail; no silent stubs - [x] No investigation files, proprietary inputs or images added - [x] No new third-party code - [x] Generic behaviour - [x] Depends on: none - [x] AI-assisted: yes
oneandonlydean commented 2026-10-10 05:16:52 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-10T05:16:52Z.


#1503 and #1830 are in, and this now conflicts with main in GuestModuleBuilder.cpp; please rebase onto main.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6094128588 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/1815#issuecomment-6094128588). Originally posted by [oneandonlydean](https://github.com/oneandonlydean) on 2026-10-10T05:16:52Z. --- #1503 and #1830 are in, and this now conflicts with main in `GuestModuleBuilder.cpp`; please rebase onto main.
eliasbruno124-dev commented 2026-10-10 06:11:56 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by eliasbruno124-dev on 2026-10-10T06:11:56Z.


Rebased onto main f3999054 as e2401a8d, with one commit and no merge commits. #1503/#1830 are now upstream; the conflict resolution preserves extension matching and shipped filenames while enabling the nested scans. Added cases cover their interaction with exclusions and ambiguous stems.

The Windows Release build, conventions and affected regressions pass. Restoring main's discovery implementation makes the nested regression fail on the missing provider again. The full local suite passes 58/59; the unchanged upstream TLS group still times out at 30 seconds. No timeout was raised. The description records the exact scope and keeps earlier title evidence separate. New-head CI is pending.

Prepared with AI assistance.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6094532035 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/1815#issuecomment-6094532035). Originally posted by [eliasbruno124-dev](https://github.com/eliasbruno124-dev) on 2026-10-10T06:11:56Z. --- Rebased onto main `f3999054` as `e2401a8d`, with one commit and no merge commits. #1503/#1830 are now upstream; the conflict resolution preserves extension matching and shipped filenames while enabling the nested scans. Added cases cover their interaction with exclusions and ambiguous stems. The Windows Release build, conventions and affected regressions pass. Restoring main's discovery implementation makes the nested regression fail on the missing provider again. The full local suite passes 58/59; the unchanged upstream TLS group still times out at 30 seconds. No timeout was raised. The description records the exact scope and keeps earlier title evidence separate. New-head CI is pending. Prepared with AI assistance.
adriadam10 commented 2026-10-10 07:19:04 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-10T07:19:04Z.


Checked on Linux, merged onto current main: relinker build and ctest 57/57 pass; guest_needed_nested_modules and guest_needed_modules fail with main's GuestModuleBuilder.cpp and pass with the change. The rebase asked for is done, the merge is clean, and the relinker jobs (Linux/Windows/macOS) and conventions are green on this head. Merging. #1782 touches the same lines in GuestModuleBuilder.cpp, so it will need a rebase after this lands.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6095051808 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/1815#issuecomment-6095051808). Originally posted by [adriadam10](https://github.com/adriadam10) on 2026-10-10T07:19:04Z. --- Checked on Linux, merged onto current main: relinker build and ctest 57/57 pass; `guest_needed_nested_modules` and `guest_needed_modules` fail with main's `GuestModuleBuilder.cpp` and pass with the change. The rebase asked for is done, the merge is clean, and the relinker jobs (Linux/Windows/macOS) and conventions are green on this head. Merging. #1782 touches the same lines in `GuestModuleBuilder.cpp`, so it will need a rebase after this lands.
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!1815
No description provided.