Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Class#getDeclaredField not remappable with Proguard mappings #87

Open
Jikoo opened this issue Oct 7, 2022 · 0 comments
Open

Class#getDeclaredField not remappable with Proguard mappings #87

Jikoo opened this issue Oct 7, 2022 · 0 comments

Comments

@Jikoo
Copy link

Jikoo commented Oct 7, 2022

Class#getDeclaredField is supposed to be remappable. It turns out that that doesn't work using SpecialSource or SpecialSourceMP because the remapping needs to be done by a preprocessor so that the owning class name is still the old class name.
SS via command line and SSMP both only support post-processors (and require an access transformer file to enable that, though that's fine because supplying an empty file works). I started working on a change to add a parameter for preprocessing only to find out that SS is also incapable of correctly matching fields from Mojang's Proguard mappings.

RemapperProcessor#remapGetDeclaredField calls JarMapping#tryClimb with a null descriptor. JarMapping#tryClimb assembles that info into a key used in Map#get. For the other mapping types, this is fine, but for Proguard mappings the key includes the descriptor. We don't know what the actual type is from the bytecode because it's being accessed via reflection, so we can never create a valid key.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant