You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by GitBox <gi...@apache.org> on 2020/03/10 15:34:51 UTC

[GitHub] [camel-quarkus] ppalaga opened a new issue #868: Add templates config option to the Mustache extension

ppalaga opened a new issue #868: Add templates config option to the Mustache extension
URL: https://github.com/apache/camel-quarkus/issues/868
 
 
   The mustache extension requires that the application developers use `quarkus.native.additional-build-args =-H:ResourceConfigurationFiles=resources-config.json` https://github.com/apache/camel-quarkus/pull/866/files#diff-8dd2b01ede99ee34a76c5e27361d4825R17 to add the templates to the native image.
   
   This solution has several drawbacks: 
   
   * It is not ergonomic
   * It is not consistent with how we did similar things in other extensions so far and 
   * It breaks the portability of the test to `quarkus-platform` - one would have to copy the json file manually.
   
   There are two ways this handled in other extensions: 
   
   1. Include/exclude patterns like in https://github.com/apache/camel-quarkus/blob/master/extensions/core/runtime/src/main/java/org/apache/camel/quarkus/core/CamelConfig.java#L75-L100
   
   2. List of files or directories like in https://github.com/apache/camel-quarkus/pull/864/commits/161ddb1e6d530aaf3283d445761d30ff0c8f1cb7#diff-56b018479519fc93fac85a776b5c285aR38

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [camel-quarkus] ppalaga commented on issue #868: Add templates config option to the Mustache extension

Posted by GitBox <gi...@apache.org>.
ppalaga commented on issue #868: Add templates config option to the Mustache extension
URL: https://github.com/apache/camel-quarkus/issues/868#issuecomment-597308961
 
 
   ... which is to say that I like the general idea and that we should try to contribute it to Quarkus.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [camel-quarkus] lburgazzoli commented on issue #868: Add templates config option to the Mustache extension

Posted by GitBox <gi...@apache.org>.
lburgazzoli commented on issue #868: Add templates config option to the Mustache extension
URL: https://github.com/apache/camel-quarkus/issues/868#issuecomment-597211384
 
 
   Wonder if we can pre-compile the templates similar to what we have done for xslt, if the user still need to have the files then resources-config.json could be the way to go but will be user responsability

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [camel-quarkus] ppalaga commented on issue #868: Add templates config option to the Mustache extension

Posted by GitBox <gi...@apache.org>.
ppalaga commented on issue #868: Add templates config option to the Mustache extension
URL: https://github.com/apache/camel-quarkus/issues/868#issuecomment-597308585
 
 
   Or even 
   
   ```
   quarkus.resources.includes  = ...
   quarkus.resources.excludes  = ...
   ```
   
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [camel-quarkus] aldettinger closed issue #868: Add templates config option to the Mustache extension

Posted by GitBox <gi...@apache.org>.
aldettinger closed issue #868: Add templates config option to the Mustache extension
URL: https://github.com/apache/camel-quarkus/issues/868
 
 
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [camel-quarkus] aldettinger commented on issue #868: Add templates config option to the Mustache extension

Posted by GitBox <gi...@apache.org>.
aldettinger commented on issue #868: Add templates config option to the Mustache extension
URL: https://github.com/apache/camel-quarkus/issues/868#issuecomment-600809550
 
 
   I may step back from the fully pre-compiled approach as I'm stuck on mustache object serialization to runtime init phase. I'll check other options.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [camel-quarkus] lburgazzoli commented on issue #868: Add templates config option to the Mustache extension

Posted by GitBox <gi...@apache.org>.
lburgazzoli commented on issue #868: Add templates config option to the Mustache extension
URL: https://github.com/apache/camel-quarkus/issues/868#issuecomment-597488426
 
 
   > Wonder if we can pre-compile the templates similar to what we have done for xslt, if the user still need to have the files then resources-config.json could be the way to go but will be user responsability
   
   @aldettinger mind to check if this ^^^ would be possible ?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [camel-quarkus] lburgazzoli commented on issue #868: Add templates config option to the Mustache extension

Posted by GitBox <gi...@apache.org>.
lburgazzoli commented on issue #868: Add templates config option to the Mustache extension
URL: https://github.com/apache/camel-quarkus/issues/868#issuecomment-597214188
 
 
   Maybe we could also make a little easier to include resource files with properties like:
   
   ```
   quarkus.camel.resources.includes  = ...
   quarkus.camel.resources.excludes  = ...
   ```
   
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [camel-quarkus] aldettinger commented on issue #868: Add templates config option to the Mustache extension

Posted by GitBox <gi...@apache.org>.
aldettinger commented on issue #868: Add templates config option to the Mustache extension
URL: https://github.com/apache/camel-quarkus/issues/868#issuecomment-600237754
 
 
   As far as I could drill, I've found no way to pre-compile templates on top of camel 3.1.
   
   I'm thinking about complementing the mustache component with a kind of "mustache registry" (resourceUri -> pre-compiled-mustache-template). At endpoint creation time, the mustache component could then try to provide a pre-compiled mustache template according to the resource uri. OnExchange processing, the template is resolved with priority from header, then pre-compiled, then as usual.
   
   On camel-quarkus side, I guess we would just need to record the "registry" / component initialization.
   
   Maybe there is a way to skip the component level and make camel-quarkus store the "mustache registry" in the camel-registry... I don't know.
   
   Any advices, inputs, pointers are welcome :)
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [camel-quarkus] aldettinger commented on issue #868: Add templates config option to the Mustache extension

Posted by GitBox <gi...@apache.org>.
aldettinger commented on issue #868: Add templates config option to the Mustache extension
URL: https://github.com/apache/camel-quarkus/issues/868#issuecomment-603105653
 
 
   Mustache integration tests are now using include-patterns/exclude-patterns for resource inclusion.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services