Repository navigation
fix(tools): compare explicit APS5_EXPORT NIDs with named exports in pr_overlap - #9936
Conversation
|
I reviewed the alias parser and NID comparison path. It normalizes named The live base has advanced: this head is 1 commit ahead/11 behind current |
|
Follow-up with exact-head evidence: I reran the |
|
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.
|
8f2261b to
957b65f
Compare
|
@MarcZX10 Synced and rescanned. The head is now
#988 and #8970 keep their behaviour; whichever of #8970 and this lands second needs the small rebase noted in the description. |
|
Checked |
What
tools/pr_overlap.pynow compares exports by NID, so an explicitAPS5_EXPORT("<nid>", <function>)in one pull request is reported against a named export with the same NID in another (#9921).exports()collectsAPS5_VABIdefinitions by name and skips_nid_no_patchfunctions, soAPS5_EXPORT("Pz262plj20w", placeholder_nid_no_patch)added nothing. A pull request implementingFT_Outline_GetInsideBorder_nid_postfix, whose NID isPz262plj20w, then showed no shared export with it, and merging both fails the NID patch step withduplicate patched export name: Pz262plj20w.aliases(diff)collects the NIDs of addedAPS5_EXPORTlines, usingnid_names.source_aliases, the parsercheck_conventions.pyalready uses.scan()stores them inpr["aliases"].overlaps()now callssame_exports(), which comparesexport_ids():compute_nidof each named export plus the aliases. A match is listed by its function name when either side has the name, and by NID when both sides are aliases. NIDs that a shared dependency adds are still left out.exports()is unchanged. An_nid_no_patchhelper without anAPS5_EXPORTline still adds nothing.Like the existing name comparison, the NID comparison is not scoped to a module. I tried scoping it by source directory, and that misses the case in this issue: #9922 implements
FT_Outline_GetInsideBorderincore/libs/prx/libSceFreeType/src/OutlineBorders.cpp, which its CMake builds into the provider that has #9462's placeholder:Scoping by the built PRX would need the CMake source lists, and many use variables, included
.cmakefiles and globs. So a match in different providers is reported too. In the open-PR scan below, those are 43 pairs: the four bulk declaration PRs (#9451, #9453, #9462, #9498), or #9922 which carries #9462's declarations, against implementations in sibling providers (for example #9453'slibSceFreeTypeOlplaceholder forFT_Get_Kerningagainst #8558'slibSceFreeTypeimplementation). They don't fail the NID patch step on their own, but each is the same function declared as not implemented in one PR and implemented in the other.#8970 also edits
tools/pr_overlap.py(comparison against exports already onmain, as noted on #9921). The two touch neighbouring lines, so whichever merges second needs a small rebase.Tested
anyps5-buildCI image, Python 3.12.3):python3 -m unittest discover -s tools/tests -p "test_pr_overlap*.py"runs 70 tests, OK (3 skipped, the same skips as onmain). The two new tests intest_pr_overlap_exports.pyfail onmain'spr_overlap.pyand pass with this change.unittest discoverruns 70 tests, OK (5 skipped: the three bash and jq workflow-step tests, the POSIX control-character path test andSubdirectoryTests, whose fakeghis a shell script, the same as onmain), and both new tests pass.python pr_overlap.py --helpfromtools/starts without an import error.scan()andoverlaps()on feat(libSceFreeTypeOt): declare 150 PS5 3.20 exports #9462 (718e1755ac) and feat(freetype): implement system outline border queries #9922 (beb7b21f3d) treated as unrelated pull requests.mainreports no shared exports. This branch reportsFT_Outline_GetInsideBorderandFT_Outline_GetOutsideBorder(feat(freetype): implement system outline border queries #9922's implementations against feat(libSceFreeTypeOt): declare 150 PS5 3.20 exports #9462'sPz262plj20wandsKneJjUXWkQ), plus the 148 NIDs feat(freetype): implement system outline border queries #9922 carries from feat(libSceFreeTypeOt): declare 150 PS5 3.20 exports #9462. In the real scan, feat(freetype): implement system outline border queries #9922 listsDepends on: #9462, so that pair stays suppressed.python3 tools/pr_overlap.py --base main --out ...onmain895f47f4ee, 1,285 open PRs present in both runs) withmain's script and with this head: 43 pairs gain shared exports, all of them the cross-provider pairs above (feat(libSceFreeType): query Type 1 private dictionaries #9933 is a new one against feat(libSceFreeTypeOl): declare 150 PS5 3.20 exports #9453). No pair loses any. (One row, feat(libc): export _FDsign/_Dsign like MSVC CRT (PPSA34015) #6085 against duplicate-feat(libc): add _FDsign #9951, appears only in themainrun because duplicate-feat(libc): add _FDsign #9951 was opened between the two scans.)python3 -I tools/check_conventions.pywith this title and body: passed.git diff --check: clean.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)