Skip to content
This repository was archived by the owner on Feb 23, 2023. It is now read-only.
This repository was archived by the owner on Feb 23, 2023. It is now read-only.

ImportAware links are being called inconsistently #1079

Closed

Description

@snicoll

ImportAwareLinksDiscoverer is relying on ResolvableType to figure out whether the bean type implements ImportAware. Unfortunately, some bean definitions doesn't have one so we should fallback to the beanClassName if necessary.

Activity

  1. added this to the 0.11.0-M1 milestone on Sep 24, 2021
  2. changed the title [-]ImportAware link is not detected if the bean definition does not have a ResolvableType[/-] [+]ImportAware links are being called inconsistently[/+] on Sep 27, 2021
  3. snicoll commented on Sep 27, 2021

    @snicoll
    ContributorAuthor

    On a second look, this is rather a different problem. We're taking the parent configuration class as the import link whereas framework really means the import semantic. So, for instance, if you have a inner class of a configuration class that's import aware, the AOT engine will honor the callback whereas the JVM would not (as the inner class wasn't @Import'ed).

    Unfortunately, there's no API to access that information as the ImportStack is computed at runtime. We will have to change something in our override of ConfigurationClassParser for this.

  4. self-assigned this
    on Sep 28, 2021
  5. added a commit that references this issue on Sep 28, 2021
    1d055a1
  6. snicoll commented on Sep 28, 2021

    @snicoll
    ContributorAuthor

    Fixed by 1d055a1

  7. added a commit that references this issue on Sep 28, 2021
    2e42468
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

type: bug

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions