fix(magic-unity): select workaround signature assemblies from player compilation references#22
Closed
skydread1 wants to merge 2 commits into
Closed
fix(magic-unity): select workaround signature assemblies from player compilation references#22skydread1 wants to merge 2 commits into
skydread1 wants to merge 2 commits into
Conversation
…compilation references (#23) GenerateGenericWorkaroundMethods collected dispatch target signatures by walking the type reference closure from Assembly-CSharp against the editor's full desktop BCL, trimmed only by a Unity prefix check. On Windows that closure reaches editor-only assemblies like Mono.WebBrowser, and signatures referencing them break the IL2CPP build. Replace the prefix heuristic with an allowlist derived from CompilationPipeline player compilation references: an assembly's methods can only be dynamic dispatch targets in the player if player scripts compile against it. Editor-only assemblies are excluded structurally on any platform, with no name list to maintain. References added via rsp files are part of the player compilation reference set, so they stay in the signature pool. Init logs the reference set and each skip logs its reason so selection changes are auditable in build logs, and a guard fails the build if the reference set ever looks degenerate, instead of silently generating no workarounds. Verified on the smoke project: IL2CPP build and run, 41/41 checks passed.
54b7308 to
7cc6a89
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #23.
Fix
Collect an assembly only if it is in the player compilation reference set (
CompilationPipeline.GetAssemblies(AssembliesType.PlayerWithoutTestAssemblies)plusallReferences). Editor-only assemblies are excluded structurally on every platform, with no name list to maintain. Only assembly selection changes; the generated workaround code is untouched.Validation
Mono.SecurityandSystem.Configuration(editor-only on Mac).csc.rspreferences verified to stay in the pool (reproduced with-r:System.Web.dll).