You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
native-image currently supports the -H:IncludeResources and -H:ResourceConfigurationFiles options documented in RESOURCES.md
These options allow to include resources via one or more regular expressions.
I'd like to propose to add a way to restrict the selected set via excludes.
Excludes is a list of regular expressions. With excludes in place, a resource is selected for inclusion if and only if its path matches some of the include patterns and it does not match any of the exclude patterns.
What problem is this solving:
Say I have many resources in my source tree and I want to include some subdirectories except for some filetypes. With excludes in place, I could pass something like
Without excludes, I'd have to somehow hack everything into one expression using some negative lookaheads and alternations. I am not sure myself something like that is even possible.
Describe the solution you'd like.
I am primarily interested in getting -H:ExcludeResources. I have not thought of how excludes could be supported by -H:ResourceConfigurationFiles.
Describe who do you think will benefit the most.
GraalVM users, and developers of libraries and frameworks which depend on GraalVM
Describe alternatives you've considered.
Have a tool that scans the source tree, evaluates the includes and excludes and passes the selected paths one by one to native-image. We actually have something like that in Camel Quarkus: https://github.com/apache/camel-quarkus/pull/960/files but I believe a generic option like that belongs to native-image itself.
Express whether you'd like to help contributing this feature
I can try if there is no better candidate.
The text was updated successfully, but these errors were encountered:
Feature request
native-image
currently supports the-H:IncludeResources
and-H:ResourceConfigurationFiles
options documented in RESOURCES.mdThese options allow to include resources via one or more regular expressions.
I'd like to propose to add a way to restrict the selected set via excludes.
Excludes is a list of regular expressions. With excludes in place, a resource is selected for inclusion if and only if its path matches some of the include patterns and it does not match any of the exclude patterns.
What problem is this solving:
Say I have many resources in my source tree and I want to include some subdirectories except for some filetypes. With excludes in place, I could pass something like
Without excludes, I'd have to somehow hack everything into one expression using some negative lookaheads and alternations. I am not sure myself something like that is even possible.
Describe the solution you'd like.
I am primarily interested in getting
-H:ExcludeResources
. I have not thought of how excludes could be supported by-H:ResourceConfigurationFiles
.Describe who do you think will benefit the most.
GraalVM users, and developers of libraries and frameworks which depend on GraalVM
Describe alternatives you've considered.
Have a tool that scans the source tree, evaluates the includes and excludes and passes the selected paths one by one to
native-image
. We actually have something like that in Camel Quarkus: https://github.com/apache/camel-quarkus/pull/960/files but I believe a generic option like that belongs tonative-image
itself.Express whether you'd like to help contributing this feature
I can try if there is no better candidate.
The text was updated successfully, but these errors were encountered: