Repository navigation
docs(il2cpp): explain ambiguous universal slice selection - #6243
ShuaixinHuang wants to merge 2 commits into
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
[Low impact] This documentation-only PR appears safe to merge. SummaryUpdates
Reviews (2) · Last reviewed commit: "Merge remote-tracking branch 'origin/mai..." · Reviewed by Greptile |
baron
left a comment
There was a problem hiding this comment.
AI-assisted review matched the documented ambiguity/refusal and recovery to the existing coarse-architecture selector. The review exercised exact arm64e thinning with generated Apple object files; this validates command mechanics, not real Unity linking or pointer support. Original inputs remain untouched and the thin output must be inspected without the universal-architecture selector.
No blocking content finding, but the PR currently conflicts with main. Approval is withheld until conflicts are resolved and the new revision is validated. Existing successful CI applies to this head, not an untested resolution. No local real IL2CPP/provider run is claimed.
…iguous-slice # Conflicts: # docs/il2cpp-metadata.md
|
@baron Thank you for checking the guidance and thinning command. Resolved the main conflict in ece7547, retaining upstream's new invalid-method-token explanation alongside the ambiguity row and exact-subtype recovery guidance. Net diff remains one documentation file. On pinned Node 24.22.1, npm run check, npm run docs:check and all 50 existing IL2CPP binary-reader tests passed. No local macOS/lipo or real Unity linking run is claimed. Fresh CI must qualify this head; could you please re-review and approve/merge once the current required checks pass? @morluto |
CassieFox23
left a comment
There was a problem hiding this comment.
TL;DR: Main's IL2CPP guide still leaves out the ambiguous-slice-selection refusal from issue #5752. This docs-only PR adds it, and what it says matches the code I read. One sentence about arm64 and arm64e reads the wrong way round for REA's own selector.
Findings
Should fix
- One sentence can mislead. Lines 198 to 199 say this: "A coarse
arm64name does not select anarm64esubtype". In issue #5752 this describeslipo -thin arm64, which finds no exactarm64slice. In the guide it follows the lines aboutbinary_architecture, so a reader will take it as a rule about REA's selector. The code does not work that way.selectImagenames each slice by CPU type only (MACHO_CPU) and never reads the subtype. Soarm64refuses a file with two ARM slices, like thearm64eandarm64e.x1pair in the issue. By my reading, it would take a file with onearm64eslice and no other ARM slice. I read this and did not run it. Please name the tool: "lipo -thin arm64does not select anarm64eslice", and say that REA counts every 64-bit ARM subtype asarm64. - The body does not keep the repo template as written. Please restore the template text. Four headings are there:
Summary,Change and scope,Validation performedandAuthor readiness. What is missing:- Five headings are gone:
Problem and expected behavior,Contract and boundary impact,Evidence and regression coverage,Compatibility, safety, and releaseandBefore merge. That drops their fields and boxes. These are the contract lines, the test and evidence fields, and the eight merge boxes. - In "Change and scope", the "Follow the contribution scope" link is replaced, and so is the paragraph under it. The new text is one line, "Scope decision: not applicable; documentation only."
- Under
Expected effects, only the documentation-only box is left. The template allows that box on its own. The two lines above the boxes are gone. - The "Author readiness" owner line and its three boxes are as written. The
Validate author declarationcheck passed on this head.
- Five headings are gone:
Worth a look
- The review by baron was on an older head, 6a5b25a76. It found no blocking content problem and held approval because the PR conflicted with main. The author merged main in ece7547. The compare API shows the same one file (10 added, 1 removed), and GitHub says the PR is mergeable now. The check results on this head are new, so that review does not cover them.
- Iyanuoluwa007 wrote on the issue on 21 Oct that a fix branch was ready and that a PR would follow (comment). A search on #5752 finds only this PR, so I found no competing PR. I did not read their branch.
- Nit:
lipocomes with the Apple command-line tools. A reader on Linux or Windows may not know that. A few words ("from Xcode's command-line tools") would help. For comparison,docs/go-binaries.mdline 120 says REA reads the universal table for Go binaries "withoutlipo".
Looks good
- Main (169512a) has no docs text for this refusal yet. A search of
docs/forambiguous-slice-selectionfinds nothing. The code has it atIl2cppBinaryImage.tsline 55 to 59, and the test atil2cppBinaryFile.test.tsline 642 covers it. - The new table row matches the code. The reason is in the
unsupportedgroup, as the row says. Its text matches the errormultiple universal slices declare ... no slice was selected. - The new text says "The selector must identify exactly one slice". That is the point of issue #5752, and it fits how the code counts matching slices.
- The line
Thinning resolves selection ambiguity onlyis honest. The thin file still faces metadata and binary matching. Unsupported pointer encodings still apply to it too. - A thin file without a selector goes straight through. The code returns the bytes when the file is not a universal Mach-O and no architecture was given. The same branch rejects an architecture, which the existing
slice-not-foundrow already says. - It is one file, 11 changed lines by the compare API. CI is green on ece7547.
CI required,Portable tests,Docs GenerationandStatic checkspassed. The title check passed too, and so did the author-declaration check. Source tests and the Windows lanes were skipped, as expected for a docs change. - The body is clear about gaps: no local macOS
liporun, no real Unity linking. I take thelipobehaviour from the issue's own macOS reproduction and baron's check, not from a run of mine.
Not run
- No checkout, no build, no tests, no
npm run docs:check. - I did not run
lipoor REA on any universal file. - I did not read the Iyanuoluwa007 branch.
- I did not read the body's Windows validation results, or confirm them.
Thanks, ShuaixinHuang, for the clear text and for resolving the conflict. Thanks also to coygeek for the issue with a real macOS reproduction.
Test setup
🤖 Written with Claude Code (Sonnet 5.5, verified by Opus 5.5), posted with my OK 🦊
|
Closing as superseded by current main. The complete one-file guide scope is covered: unique universal-slice selection, ambiguous-slice-selection reason-table row, exact-subtype lipo thinning, omission of architecture for the resulting thin file, and limits of that recovery. Main implementation: dab18c1. Verification: Inspected il2cpp-metadata.md:149-157 and :318 plus il2cppBinaryFile.test.ts:707-712 ambiguous-FAT regression. No tests or real macOS/lipo runs performed; PR adds no tests and changes documentation only. The complete PR diff contains no remaining unique behavior, tests, documentation, or provider-qualification work. |
Summary
Fixes #5752. The IL2CPP guide lists architecture selection requirements but omits the existing refusal when multiple universal Mach-O slices map to the same architecture. Explain unique selection, exact-subtype thinning and its limits, and add
ambiguous-slice-selectionto the unsupported-reason table.Change and scope
One documentation file, 10 additions and 1 deletion. No parser, selector, schema, provider, evidence, package or generated-file changes. Scope decision: not applicable; documentation only.
Validation performed
Synchronized with upstream
2bcd7e6d, headece75479; Windows x64, pinned Node 24.22.1 and locked dependencies:npm run check: all six tasks, module boundaries and architecture guards passed.npm run docs:check: all six tasks and five README consistency tests passed.npm run test:focused -- tests/boundary/il2cpp/il2cppBinaryFile.test.ts: all 50 tests passed, including ambiguous FAT architecture refusal.git diff --check, commit hook and push-hook typecheck/lint passed.Author readiness
Human owner: @ShuaixinHuang