You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on May 26, 2018. It is now read-only.
Repository navigation
This repository was archived by the owner on May 26, 2018. It is now read-only.
AccessTransformer does not transform subclasses #538
currently, AT will only transform the specific class, its subclasses will stay same.
this became a problem when you need to change access of a method, you have to add every single subclasses and ones that other mods add.
Unless you come up with a good reliable idea on how to generate the inheritance map at runtime this might be feasible.
But for now it simply isn't so this is classified as wont-fix/not-bug.
you don't need to deal with those, i think.
you just want access to the method through the end instance, the instance itself can access superclasses if it is coded like that. (i really think its so, but i'm not sure. if not, you can simply change 'root' class)
interfaces don't need to change, unless you are changing method to lower visibility, that way, bad things will happen.
That is indeed a problem, lex. What we can do is use the asm class adapter that searches for annotations to also collect inheritance data and use that in the AT.
It needs a proper system for ClassTransformers.
like:
having different layers for different transformers, one for monitoring changes to gather inheritance data, one for performing minor changes like changing access, and one for normal uses or uncategorized uses
having different levels of privileges to ignoring certain things like IFMLLoadingPlugin.TransformerExclusions
Activity
diesieben07 commentedon Oct 9, 2014
This is not possible to fix without major trouble. ClassTransformers don't know about the classpath, they only get one class at a time.
LexManos commentedon Oct 9, 2014
Unless you come up with a good reliable idea on how to generate the inheritance map at runtime this might be feasible.
But for now it simply isn't so this is classified as wont-fix/not-bug.
jeffreykog commentedon Oct 9, 2014
As superclasses are loaded before the classes that extend them, this might actually be easy to do. I'll try something when i get home
Cazzar commentedon Oct 9, 2014
Though it doesn't mean other inherited versions will load at the same time.
jeffreykog commentedon Oct 9, 2014
They can load later. Thats no problem. By that time the inherition info is already built
LexManos commentedon Oct 9, 2014
MM yes, but what about interfaces or the like that are declared in the sub-c;ass but implemented by the parent? How do you deal with those?
zlainsama commentedon Oct 9, 2014
you don't need to deal with those, i think.
you just want access to the method through the end instance, the instance itself can access superclasses if it is coded like that. (i really think its so, but i'm not sure. if not, you can simply change 'root' class)
interfaces don't need to change, unless you are changing method to lower visibility, that way, bad things will happen.
zlainsama commentedon Oct 9, 2014
by change root class, i mean define AT rules for root class.
jeffreykog commentedon Oct 10, 2014
That is indeed a problem, lex. What we can do is use the asm class adapter that searches for annotations to also collect inheritance data and use that in the AT.
LexManos commentedon Oct 10, 2014
jk if you find a solution let me know. Don't forget about the issues of mods adding things to the classpath without us knowing about it.
zlainsama commentedon Oct 16, 2014
It needs a proper system for ClassTransformers.
like:
having different layers for different transformers, one for monitoring changes to gather inheritance data, one for performing minor changes like changing access, and one for normal uses or uncategorized uses
having different levels of privileges to ignoring certain things like IFMLLoadingPlugin.TransformerExclusions
zlainsama commentedon Oct 16, 2014
and for minecraft code you can have pre-generated inheritance data, and runtime monitoring changes