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

Include all swagger-ui resources on GraalVM #22

Merged
merged 1 commit into from
Sep 23, 2021

Conversation

FieryCod
Copy link
Contributor

No description provided.

@Deraen
Copy link
Member

Deraen commented Sep 23, 2021

This should be fine.

Can you point me to some GraalVM documentation for this argument and what does it do?

@FieryCod
Copy link
Contributor Author

Swagger-ui resources are not included into native-image. With the IncludeResources the resources are merged with the binary and accessible via a special "resource:" protocol. See ring-clojure/ring#447 for more context.

https://www.graalvm.org/reference-manual/native-image/Resources/

@Deraen
Copy link
Member

Deraen commented Sep 23, 2021

https://www.graalvm.org/reference-manual/native-image/BuildConfiguration/

A recommended way to provide configuration is to embed a native-image.properties file into a project JAR file.

I'm trying to understand what is the practice with libraries regarding this configuration. That page mentions "a project JAR," but I'm not sure if it means "a project" as in the consumer app or includes libraries.

But based on discussion from a Graal issue (oracle/graal#2535) and libraries like ojdbc and okhttp (https://github.com/square/okhttp/tree/master/okhttp/src/main/resources/META-INF/native-image/okhttp/okhttp), it does indeed seem to be normal for libs to include configuration for themselves.

@Deraen Deraen merged commit a65d51e into metosin:master Sep 23, 2021
@FieryCod
Copy link
Contributor Author

The libraries in general should ship their own native-image.properties. However not all the libraries are interested in having the support for GraalVM. The other case is that some libraries offer limited set of native-configuration, to prevent the extra build size (more reflection-config.json entries = bigger binary size).

Anyway for above mentioned cases we have https://github.com/clj-easy/graal-config.

@Deraen
Copy link
Member

Deraen commented Sep 23, 2021

This change is now deployed in versions 3.52.3 and 3.46.0-1.

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