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

Pass --exclude-config programatically #17482

Closed
ppalaga opened this issue May 26, 2021 · 13 comments · Fixed by #19649 or #19806
Closed

Pass --exclude-config programatically #17482

ppalaga opened this issue May 26, 2021 · 13 comments · Fixed by #19649 or #19806

Comments

@ppalaga
Copy link
Contributor

ppalaga commented May 26, 2021

--exclude-config was introduced in oracle/graal#3179
It would be nice to be able to pass it programatically from a Quarkus extension

@geoand
Copy link
Contributor

geoand commented Aug 4, 2021

@galderz do you plan on making this available for easy use in Quarkus?

@galderz
Copy link
Member

galderz commented Aug 19, 2021

@geoand No, that's not something I'm looking into.

@geoand
Copy link
Contributor

geoand commented Aug 24, 2021

Thanks for the info @galderz.

I assume that at some point this is something we would want to have in Quarkus

@geoand
Copy link
Contributor

geoand commented Aug 24, 2021

@Sanne this is something you wanted as well, right?

@Sanne
Copy link
Member

Sanne commented Aug 24, 2021

@Sanne this is something you wanted as well, right?

Right! We have an immediate need in the case of the Oracle JDBC driver, and I totally expect more libraries in the future to occasionally include some mistakes, which we would only be able to work around when we have this.

@geoand
Copy link
Contributor

geoand commented Aug 24, 2021

@galderz how would one access this programmatically from a Feature?
I am not even sure though that it makes sense to add it to the Feature, maybe it's best we add it to the command line arguments.

@galderz
Copy link
Member

galderz commented Aug 24, 2021

@geoand I don't think doing this a Feature is possible. The code that excludes jars/resources works in the 1st stage of native-image, the driver phase. This phase constructs a java invocation for the second phase and hence we exclude things to being passed on to the 2nd phase, where Feature instances and others come into play.

I would expect that each extension would define 0..N exclude-config parameters (see examples here), and then native image would take all of those and pass them in as parameters to native-image invocation.

@geoand
Copy link
Contributor

geoand commented Aug 24, 2021

Gotcha. I'll look into it hopefully sometime soon

@Sanne
Copy link
Member

Sanne commented Aug 24, 2021

Features should be able to change the flags which we feed into the native-image process

@galderz
Copy link
Member

galderz commented Aug 24, 2021

Ah, you mean Quarkus Features? I thought @geoand was referring to GraalVM Features... :)

@geoand
Copy link
Contributor

geoand commented Aug 24, 2021

Yes, I did mean GraalVM Features

@Sanne
Copy link
Member

Sanne commented Aug 24, 2021

ah ok. Yes it definitely needs to be at the level of command line arguments, anything else would be too late.

@geoand
Copy link
Contributor

geoand commented Aug 25, 2021

I opened #19649, but the problem is that I can't seem to get native-image work with multiple --exclude-config options, so I'll need @galderz's help with that

UPDATE:

PR fixed with the help of @jaikiran

geoand added a commit to geoand/quarkus that referenced this issue Aug 25, 2021
geoand added a commit to geoand/quarkus that referenced this issue Aug 25, 2021
Sanne added a commit that referenced this issue Aug 26, 2021
Add the ability for extensions to exclude GraalVM config from jars
@quarkus-bot quarkus-bot bot added this to the 2.3 - main milestone Aug 26, 2021
Sanne pushed a commit to Sanne/quarkus that referenced this issue Aug 31, 2021
@gsmet gsmet modified the milestones: 2.3 - main, 2.2.2.Final Sep 6, 2021
gsmet pushed a commit to gsmet/quarkus that referenced this issue Sep 6, 2021
gsmet pushed a commit to gsmet/quarkus that referenced this issue Sep 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment