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

Document that Java libraries should not have --allow-incomplete-classpath in their native-image.properties #3491

Closed
ppalaga opened this issue Jun 18, 2021 · 2 comments

Comments

@ppalaga
Copy link

ppalaga commented Jun 18, 2021

The native image docs says

--allow-incomplete-classpath: allow the image build with an incomplete class path. Report type resolution errors at runtime when they are accessed the first time, instead of during the image build.

The statement does not put the option into the right context. For example library maintainers may think that it is a good idea to add --allow-incomplete-classpath to their native-image.properties thus enabling it for everybody depending on their library.

I think the docs should state that

  • The option is intended mainly for debug purposes
  • The option should generally not be present in native-image.properties of libraries intended for consumption by third parties.

It would be nice to have this documented when reporting issues like GoogleCloudPlatform/native-image-support-java#141 or arangodb/arangodb-java-driver#397

@christianwimmer
Copy link

We have the plan to make --allow-incomplete-classpath the default, and instead provide an option to enforce a "complete" classpath per library / package. See also the discussion in #2762
I hope to get that done for the 21.3 release.

So I don't think it is necessary right now to fight for library maintainers to not specify --allow-incomplete-classpath - especially since there is no per-package option yet that we could tell them to use.

@ppalaga
Copy link
Author

ppalaga commented Jun 22, 2021

Thanks @christianwimmer, commented there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants