-
-
Notifications
You must be signed in to change notification settings - Fork 441
-
-
Notifications
You must be signed in to change notification settings - Fork 441
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
Weird reobfuscation error with scala traits causes AbstractMethodError when running in obfuscated environment #205
Comments
Thinking about this some more this is not specific to scala, you can get the same result with java
Gives exactly the same result. I'm not even sure how this can be fixed, creating a synthetic bridge method during reobfuscation? Would that be possible or even be a good idea? |
ForgeGradle does no do any obfuscation itself. I simply hand the jar over to SpecialSource for obfuscation. It would be within your best interest to open on an issue on that project. |
Looks like the same issue? md-5/SpecialSource#12 |
Sorry, wasn't aware that SS has it's own tracker. I've opened md-5/SpecialSource#31 literaly seconds before @matthewprenger posted about md-5/SpecialSource#12. I'm not sure if it's the same issue. |
For the IAgriCrop interface, this renames the getPos and getWorld methods so as to not match the methods inherited from TileEntity. The only uses so far were in the mutation strategies. And the newly named methods just call the original named methods via 'this'. This workaround is for a re-obfuscation bug in Special Source, a program that ForgeGradle depends on. MinecraftForge/ForgeGradle#205 md-5/SpecialSource#12
This happens if a scala trait that doesn't extend a vanilla class declares a method with the same name as something in a vanilla class, then a class mixes this trait with that class, for example:
This compiles and works correctly in an unobfuscated environment.
After reobfuscation C.bar gets changed to the obfuscated name as expected
But the interface and C.foo still refers to the unobfuscated name
And a call to C.foo will crash with
I made a minimal project to demonstrate the issue - it will crash in PreInit when running in an obfuscated environment.
The text was updated successfully, but these errors were encountered: