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

Qute: disable optimization of generated value resolvers #33881

Closed
mkouba opened this issue Jun 7, 2023 · 1 comment · Fixed by #33984
Closed

Qute: disable optimization of generated value resolvers #33881

mkouba opened this issue Jun 7, 2023 · 1 comment · Fixed by #33984
Assignees
Labels
area/qute The template engine kind/enhancement New feature or request
Milestone

Comments

@mkouba
Copy link
Contributor

mkouba commented Jun 7, 2023

Description

Currently, the value resolvers that are generated based on type-safe validation findings are optimized, i.e. only fields/methods used in templates are considered. All other members are ignored. However, this does not play well with included templates and user tags. For example, if there is a template that is validated (because it either has a param declaration or is used from a type-safe template) like this:

{@org.acme.Item item}
<p>
{item.name}
</p>
{#include foo /}

and in the foo template there is:

<p>
{item.price}
</p>

Then only item.name is considered and item.price is ignored, unless the included template also declares the param declaration, e.g.

{@org.acme.Item item}
<p>
{item.price}
</p>

This may cause problems when generating native images.

Implementation ideas

We should probably introduce a new config property quarkus.qute.optimize-value-resolvers and disable the optimization by default.

@mkouba mkouba added the kind/enhancement New feature or request label Jun 7, 2023
@quarkus-bot quarkus-bot bot added the area/qute The template engine label Jun 7, 2023
@mkouba
Copy link
Contributor Author

mkouba commented Jun 12, 2023

Actually, we could disable this optimization only in the native build.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/qute The template engine kind/enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant