Repository navigation
Keep Remapper's access-flag overloads so MCPC+ can remap Bukkit plugins - #2
Merged
Merged
Conversation
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.
Problem
With agent 2.1.0, no Bukkit plugin loads on MCPC+ 1.6.4. Every plugin fails with:
MCPC+ remaps every plugin class with its bundled SpecialSource, which calls
Remapper.mapFieldNameandRemapper.mapMethodNamewith a fourth argument (themember's access flags). MCPC+'s ASM 4 had these overloads; stock ASM 9 does not.
Plugins depending on a failed one (e.g. anything needing WorldEdit) are then skipped too.
Fix
In
patchAsm, the bundledRemappergets the two overloads back, as MCPC+'s ASM 4 had them:mapFieldName(owner, name, desc)/mapMethodName(owner, name, desc)call the4 argument version with
access = 0;mapFieldName(owner, name, desc, int)/mapMethodName(owner, name, desc, int)return the name unchanged.
SpecialSource's
JarRemapperoverrides the 4 argument methods, so plugin classes areremapped whichever overload ASM or SpecialSource calls. The patch fails the build if
the methods are missing or already present, like the other ASM patches.
Only
build.gradlechanges.Testing
these two overloads were the only missing members.
JarRemapper: the original bundled ASM reproducesthe
NoSuchMethodError, the patchedRemapperrenames the class, field and method correctly.