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

Add web/templates as a Qute template root #165

Merged
merged 1 commit into from
Feb 19, 2024
Merged

Add web/templates as a Qute template root #165

merged 1 commit into from
Feb 19, 2024

Conversation

ia3andy
Copy link
Contributor

@ia3andy ia3andy commented Feb 19, 2024

WebBundlerConfig config) {
templateRootProducer.produce(new TemplateRootBuildItem(config.fromWebRoot("templates")));
nativeImageResourceDirectoryProducer
.produce(new NativeImageResourceDirectoryBuildItem(config.fromWebRoot("templates")));
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mkouba I had to add this for Native support

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe it should be done by the Qute Processor?

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well, we do produce a NativeImageResourceBuildItem for each template found. TBH I've never seen NativeImageResourceDirectoryBuildItem before.

Also we test a native image in quarkus-qute-web.

What's the actual problem?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mkouba the tests were not passing in native mode

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

quarkus-web-bundler tests I assume? Is there anything special in those tests?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@phillip-kruger I think this is the origin of #172, NativeImageResourceDirectoryBuildItem might want the directory to exist (which should not lead to a NPE anyway), so I need to add a check here and maybe a fix in Quarkus

@ia3andy ia3andy merged commit 36443c0 into main Feb 19, 2024
2 checks passed
@ia3andy ia3andy deleted the template-root branch February 19, 2024 14:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants