Skip to content

fix(tools): match import_audit module names like the relinker - #8124

Merged
oneandonlydean merged 1 commit into
boykopovar:mainfrom
xXPBSXx:fix/import-audit-module-names
Oct 20, 2026
Merged

oneandonlydean merged 1 commit into
boykopovar:mainfrom
xXPBSXx:fix/import-audit-module-names

Conversation

@xXPBSXx

@xXPBSXx xXPBSXx commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

What

tools/import_audit.py decides whether an import is served by a title module with library in modules, an exact file-name match. The relinker identifies modules by the name without its .prx, .sprx, .suprx or .debug_prx suffix, and on Windows ignoring case (GuestModuleBuilder.cpp ModuleStem, ImportModule.hpp ModuleSuffixes). A title whose eboot imports from EOSSDK-PS5-Shipping.debug_prx while the dump holds prx/eossdk-ps5-shipping.prx therefore gets every import reported as absent ("the loader fails") and exit code 1, although the converted title starts. ModuleNames now compares title module names by that stem, case-folded when the built libraries are Windows PE files; audit and the missing-library check use it unchanged. Two tests: a module file shipping.prx serves an import from shipping.debug_prx (CLI, JSON report class module), and ModuleNames folds case only when asked.

Overlap with #6171: measured on the same inputs, #6171 (SCE module identity) already turns the Coral-Island case from absent 236 into 0 (exit 0). This change covers the relinker's file-name rule (suffix ignored, case folded on Windows) for modules without a matching SCE identity; the CLI test (module shipping.prx, import from shipping.debug_prx) still fails with #6171 alone. I have no title evidence for that second case. Both change main() in import_audit.py (lines 731-733) and are independent; if the maintainers prefer one, #6171 first and this one rebased or closed.

Tested

Windows 10, WinLibs GCC 15.2.0 toolchain, Python 3.12: python -I tools/tests/test_import_audit.py passes (117 tests, 3 skipped); both new tests fail without the change (AttributeError: ... no attribute 'ModuleNames' and exit code 1 for the CLI case). Real data: the audit of one converted Unreal title (236 imports from EOSSDK-PS5-Shipping.debug_prx, module file eossdk-ps5-shipping.prx, Windows libs) reported absent 236 and exit 1 before, absent 0 and exit 0 after; the same title ran 560 s without a load error. A second title (Palworld, 289 such imports) had the same report. No title run for this change. tools/check_conventions.py --base upstream/main --head HEAD reports only the empty template sections.

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 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

AI-assisted (Claude Code).

🤖 Generated with Claude Code

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown

Other open pull requests touch the same code. Merging one will break the other, or both implement the same thing. If this one builds on them, list them in Depends on.

Pull request Conflicting files (lines on main) Same exports Same new files
PR 6171 tools/import_audit.py L731-733

Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap.

Pull request Shared files not compared
PR 7454 tools/import_audit.py
tools/tests/test_import_audit.py

@oneandonlydean oneandonlydean self-assigned this Oct 20, 2026
@oneandonlydean
oneandonlydean merged commit 2754903 into boykopovar:main Oct 20, 2026
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants