Open ChloeDawn opened 5 years ago
Ah yes. The requirement is because the mappings require the descriptor in order to locate the obfucation mapping. There are two things I think can be done to work around this:
<init>
the remapping could be done using the fallback method of remapping the individual parts of the descriptor (eg. class names which appear in the owner and arguments)For the time being you can work around this by fully qualifying the reference as described in the other issue, taking into account the full descriptor of the synthetic constructor. But I can definitely attempt to make the AP smarter to address this.
For reference, the injection point itself consumes the signature as a "query" and that query matches candidates in the code. The Annotation Processor cannot access the code and therefore cannot resolve the references which may or may not exist in the method body, it can only look at the target type and figure out what exists there. This means that references such as doSomething
can never be resolved on an @At
but references such as Lsome\Class;doSomething
can potentially be resolved as long as there is only one member with that name in the target class.
I'm labelling this as enhancement rather than bug because this behaviour is intended, but functionality can be improved.
Although the signature can be unqualified at runtime, compilation fails here for At targets with ommited owners and signatures during refmap generation. Related: https://github.com/SpongePowered/Mixin/issues/300#issuecomment-463453763
Current version: 0.7.11
Is it possible to resolve this?
https://github.com/SpongePowered/Mixin/blob/81a22a4f1d1cf59089bed40cdab4913860340c22/src/ap/java/org/spongepowered/tools/obfuscation/AnnotatedMixinElementHandlerInjector.java#L312-L316