quarkusio / quarkus

Quarkus: Supersonic Subatomic Java.
https://quarkus.io
Apache License 2.0
13.64k stars 2.64k forks source link

Extend native image agent filtering to packages configured by extensions #40360

Open galderz opened 5 months ago

galderz commented 5 months ago

Description

Thanks to #36822 JVM mode integration tests can now optionally run with the native image agent, providing a starting point for native image configuration for 3rd party libraries not yet supported via a Quarkus extension. Quarkus instructs the native image agent to filter configuration for packages that Quarkus takes care of, but this filtering does not include additional extensions.

In this enhancement, we should find a way for extensions that are registered with Quarkus to provide a set of packages that should be filtered out when being used with the native image agent. For example, if using the cache extension, we should set up a filter in the native image agent to skip configuration related to the com.github.benmanes.caffeine.cache package.

Implementation ideas

Unless there's metadata already available to signal this, an additional build item could provide such information.

quarkus-bot[bot] commented 5 months ago

/cc @radcortez (config), @zakkak (native-image)