fix(tools): check exports through local ABI aliases #9568

Closed
SnekPolylepis wants to merge 1 commit from upstream-pr/9568 into main
SnekPolylepis commented 2026-10-22 02:38:30 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by SnekPolylepis on 2026-10-22T02:38:30Z.


Refresh: October 26 refresh: merged current upstream main at c8254c160. Windows conventions and git diff --check pass; 181 conventions tests pass (Python 3.13). The earlier test results below refer to the previous head.

What

Local calling-convention aliases such as #define NATIVE_SYSV APS5_VABI currently hide exports from the conventions checker's duplicate-export and silent-stub checks. Expand local single-line object-like aliases before identifying exports, including alias chains, redefinitions, undefinitions and cycles. Preserve the original source for comment checks.

Add regression cases showing that aliased exports cannot bypass either check. This changes tooling only and adds no dependencies.

Tested

  • Windows, Python 3.13: all 151 conventions tests passed; final focused suite of 16 tests passed again before pushing.
  • Ubuntu 24.04 / WSL, Python 3.12: all 151 conventions tests passed from the committed snapshot in a native Linux Git checkout.
  • Conventions self-check and git diff --check passed.
  • Reproduced hidden duplicate exports on an existing local branch; the updated checker rejects them.
  • tools/pr_overlap.py --branch fix/abi-alias-export-check: no overlap with open pull requests. Related PR #8777 covers assembly exports; merge-tree check with its fetched head was clean.

Scope: local single-line object-like aliases only; this does not implement a full C++ preprocessor.

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
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4961258454 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/9568). Originally posted by [SnekPolylepis](https://github.com/SnekPolylepis) on 2026-10-22T02:38:30Z. --- **Refresh:** October 26 refresh: merged current upstream main at c8254c160. Windows conventions and git diff --check pass; 181 conventions tests pass (Python 3.13). The earlier test results below refer to the previous head. ### What Local calling-convention aliases such as `#define NATIVE_SYSV APS5_VABI` currently hide exports from the conventions checker's duplicate-export and silent-stub checks. Expand local single-line object-like aliases before identifying exports, including alias chains, redefinitions, undefinitions and cycles. Preserve the original source for comment checks. Add regression cases showing that aliased exports cannot bypass either check. This changes tooling only and adds no dependencies. ### Tested - Windows, Python 3.13: all 151 conventions tests passed; final focused suite of 16 tests passed again before pushing. - Ubuntu 24.04 / WSL, Python 3.12: all 151 conventions tests passed from the committed snapshot in a native Linux Git checkout. - Conventions self-check and `git diff --check` passed. - Reproduced hidden duplicate exports on an existing local branch; the updated checker rejects them. - `tools/pr_overlap.py --branch fix/abi-alias-export-check`: no overlap with open pull requests. Related PR #8777 covers assembly exports; merge-tree check with its fetched head was clean. Scope: local single-line object-like aliases only; this does not implement a full C++ preprocessor. <!-- OS, title or homebrew, what was checked. "Not tested" is a valid answer. A performance change: the summary lines of main and of this PR from the same machine and scene, with the traces attached, captured as the Performance report issue form describes. --> ### Checklist <!-- Rules behind each item: https://github.com/boykopovar/AnyPS5/blob/main/CONTRIBUTING.md --> - [ ] 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 under Silent stubs in their library's [technical debt](https://github.com/boykopovar/AnyPS5/tree/main/docs/dev/debt) file - [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] Fixes: none - [x] Unblocks: none - [x] GPUs tested: n/a - [x] AI-assisted: yes
github-actions[bot] commented 2026-10-22 02:38:54 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-22T02:38:54Z.


Thank you for your contribution! Authors with no pull requests merged into main can have 1 open pull request at a time, authors with at least 1 merged can have 20, and from 20 merged there is no limit. This PR has been automatically closed and labeled "open PR limit" because that limit was reached. This is not a judgment of the quality of your changes: reopen it once one of your open pull requests is merged or closed.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6331347827 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/9568#issuecomment-6331347827). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-10-22T02:38:54Z. --- Thank you for your contribution! Authors with no pull requests merged into `main` can have 1 open pull request at a time, authors with at least 1 merged can have 20, and from 20 merged there is no limit. This PR has been automatically closed and labeled "open PR limit" because that limit was reached. This is not a judgment of the quality of your changes: reopen it once one of your open pull requests is merged or closed.

Pull request closed

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!9568
No description provided.