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

allow-incomplete-classpath only for specific classes #1664

Open
codemonstur opened this issue Sep 6, 2019 · 0 comments
Assignees

Comments

@codemonstur
Copy link

@codemonstur codemonstur commented Sep 6, 2019

I'm trying to get the HikariCP library to compile using native-image. There is a part of the code that calls missing classes on the classpath and naturally the compiler errors out there.
I don't want to use --allow-incomplete-classpath because it would ignore all classes everywhere when I really only want to ignore these specific classes. (And preferably only at those specific places in the codebase). As far as I know no such functionality exists in graal at the moment.

I'm aware of substitutions and would love to use the feature however the mechanism has limitations which stops me from using it. I.e. I can't call methods on the object I'm in, I can't assign a value to member fields and I can't instantiate objects defined in package private packages.

Error: com.oracle.graal.pointsto.constraints.UnresolvedElementException: Discovered unresolved type during parsing: com.codahale.metrics.MetricRegistry. To diagnose the issue you can use the --allow-incomplete-classpath option. The missing type is then reported at run time when it is accessed the first time.

Error: com.oracle.graal.pointsto.constraints.UnresolvedElementException: Discovered unresolved type during parsing: com.codahale.metrics.health.HealthCheckRegistry. To diagnose the issue you can use the --allow-incomplete-classpath option. The missing type is then reported at run time when it is accessed the first time.
@cstancu cstancu self-assigned this Sep 12, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.