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

Improve conversion service infrastructure to be AOT aware #30722

Closed
snicoll opened this issue Jun 22, 2023 · 3 comments
Closed

Improve conversion service infrastructure to be AOT aware #30722

snicoll opened this issue Jun 22, 2023 · 3 comments
Labels
in: core Issues in core modules (aop, beans, core, context, expression) status: declined A suggestion or change that we don't feel we should currently apply theme: aot An issue related to Ahead-of-time processing

Comments

@snicoll
Copy link
Member

snicoll commented Jun 22, 2023

The use of conversion service in a native image requires hints that are not always very predictable. This is particularly the case with ObjectToObjectConverter that can default to a constructor that takes a String if you're trying to bind a property to an object.

We've been discovering those and adding hints whenever necessary (for instance #30201). Doing so is brittle and we should try to find a way to allow the conversion service to run in dry mode or something, where the conversion decision can be retained, and the necessary hints inferred automatically.

@snicoll snicoll added the status: waiting-for-triage An issue we've not yet triaged or decided on label Jun 22, 2023
@snicoll snicoll added the theme: aot An issue related to Ahead-of-time processing label Jun 22, 2023
@snicoll snicoll transferred this issue from spring-projects/spring-boot Jun 22, 2023
@snicoll snicoll added the in: core Issues in core modules (aop, beans, core, context, expression) label Jun 22, 2023
@snicoll
Copy link
Member Author

snicoll commented Dec 28, 2023

It's waiting for triage as I have no idea if that's feasible. Wondering if @jhoeller has an opinion about it.

@jhoeller
Copy link
Contributor

It might be technically feasible to pre-determine some of this but I'm not sure it is worth the complexity in the conversion infrastructure itself. That aside, even the conversion infrastructure itself does not know which target classes it is going to be called for. From that perspective, we'd have to apply this to a set of pre-selected candidate classes even there.

@snicoll
Copy link
Member Author

snicoll commented Dec 29, 2023

Alright, that confirms my suspicion. Let's close this.

@snicoll snicoll closed this as not planned Won't fix, can't repro, duplicate, stale Dec 29, 2023
@snicoll snicoll added status: declined A suggestion or change that we don't feel we should currently apply and removed status: waiting-for-triage An issue we've not yet triaged or decided on labels Dec 29, 2023
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) status: declined A suggestion or change that we don't feel we should currently apply theme: aot An issue related to Ahead-of-time processing
Projects
None yet
Development

No branches or pull requests

2 participants