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

Identify invalid factory methods AOT when possible #32794

Open
sdeleuze opened this issue May 10, 2024 · 1 comment
Open

Identify invalid factory methods AOT when possible #32794

sdeleuze opened this issue May 10, 2024 · 1 comment
Labels
in: core Issues in core modules (aop, beans, core, context, expression) theme: aot An issue related to Ahead-of-time processing type: enhancement A general enhancement

Comments

@sdeleuze
Copy link
Contributor

As discussed with @snicoll and @jhoeller while working on #32719, InstanceSupplierCodeGenerator#generateCode currently does not perform the same checks than org.springframework.beans.factory.support.ConstructorResolver#instantiateUsingFactoryMethod except the recent suspending function check added recently.

It would be nice from a DevXP and consistency perspective if it could perform AOT some of those checks (like the void return type check for example).

@sdeleuze sdeleuze added in: core Issues in core modules (aop, beans, core, context, expression) type: enhancement A general enhancement theme: aot An issue related to Ahead-of-time processing labels May 10, 2024
@sdeleuze sdeleuze added this to the 6.2.x milestone May 10, 2024
@snicoll
Copy link
Member

snicoll commented May 11, 2024

What I would like to see is a way to run those checks with some sort of API that allow to decouple them. There might be an interest to also accumulate those errors so that it doesn't fail one by one.

@jhoeller jhoeller modified the milestones: 6.2.x, General Backlog Sep 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: core Issues in core modules (aop, beans, core, context, expression) theme: aot An issue related to Ahead-of-time processing type: enhancement A general enhancement
Projects
None yet
Development

No branches or pull requests

3 participants