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

Fixes and improvements for retrieving IMixinInfo from ClassInfo #529

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Commits on Aug 14, 2023

  1. Add applied MixinInfo to target class rather than mixin class

    In MixinInfo#postApply, the MixinInfo reference was being added to the
    ClassInfo of the mixin itself, rather than the classes the mixin is
    applied to. This meant that Mixins.getMixinsForClass would only return
    MixinInfo on mixin classes themselves, not their target classes, and
    ClassInfo#getAppliedMixins() was empty for target classes.
    This change fixes the behaviour to resolve the ClassInfo of the target
    class and add the MixinInfo to that.
    comp500 committed Aug 14, 2023
    Configuration menu
    Copy the full SHA
    f304b20 View commit details
    Browse the repository at this point in the history
  2. Expose info of mixins targeting a class and info from a mixin class

    Allow external code to query the list of mixins that target a class,
    including mixins that were not applied, by exposing getMixins; this
    method wasn't used internally but exposing it allows external error
    handlers greater visibility of mixins targeting a class.
    
    ClassInfo.mixin is also exposed with getMixinInfo to allow external
    code to retrieve mixin metadata from a class. This supersedes the need
    for some other methods like isMixin and isLoadable, but these are kept
    for compatibility.
    comp500 committed Aug 14, 2023
    Configuration menu
    Copy the full SHA
    1240888 View commit details
    Browse the repository at this point in the history