md-5 / SpecialSource

Automatic generator and renamer of jar obfuscation mappings.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

class B extends A implements I{} class A { void foo(); } interface I {void foo();}

md-5 opened this issue · comments

commented
commented

?

commented

The above case fails to remap A.foo->A.bar in the case I.foo->I.bar

Possibly related and also broken:
class A { void foo(); } class B extends A implements I{} interface I{ void foo(); } MD: I/foo ()V I/bar ()V

In other words, implementing an interface function in a superclass that doesn't implement the interface breaks all kinds of shit, badly. Renaming needs to traverse the inheritance tree in both directions.

Would like to bump this, actually. It's been a while.

commented

@iChun it can't actually be fixed properly without generating synthetic redirect methods, which is a whole extra can of worms.

Ahh, @AbrarSyed pointed me in your direction cause I was prodding him about ATs not transforming methods which override a super.method which was ATed to.. eg from protected to public, requiring multiple AT lines like these: https://github.com/MinecraftForge/MinecraftForge/blob/master/src/main/resources/forge_at.cfg#L127-L132

Might be a separate issue altogether for all I know but thought I'd just mention it now.

commented

Thats a completely different issue, you should probably open a ticket for it.

Dang, I'm in bed now. I'll try to remember in the morning but I'll probably
forget. Wouldn't be too hard to fix now, would it?
On 15 Jul 2014 13:14, "md-5" notifications@github.com wrote:

Thats a completely different issue, you should probably open a ticket for
it.


Reply to this email directly or view it on GitHub
#12 (comment).

commented

Probably not, for simple cases such as the above anyway. However that being said our AT code was relicensed directly from Forge by cpw, so any bugs are either the result of:
a) error in porting to SS
b) error in Forge AT itself

I'm also running into this problem. Has anyone addressed it or found a work around?

There are work arounds. They often result in extra boilerplate, but its fairly simple to avoid the described situation, usually by adding redirects in the child classes.

This is a major source of boilerplate and confusion in Forestry.
It also prevents me from creating default interfaces to redirect vanilla interfaces to a delegate.
Here's a nice example of doing that with a Forge interface: ForestryMC/ForestryMC@92eab8d
Unfortunately it's not possible with IItemHandler or anything else with obfuscated names due to this bug.

Also the infamous "getWorld()" bugs. ;)