-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[GR-44733] Public flag for missing registration errors.
PullRequest: graal/17804
- Loading branch information
Showing
5 changed files
with
43 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 25 additions & 0 deletions
25
...c/com.oracle.svm.core/src/com/oracle/svm/core/doc-files/ExactReachabilityMetadataHelp.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
Enables exact and user-friendly handling of reflection, resources, JNI, and serialization. | ||
When reachability metadata for an element is specified, the native executable will have expected and predictable behavior. | ||
When reachability metadata for an element is not specified, the binary will fail fast with a subtype of `java.lang.Error` | ||
that explains exactly which element was missing. The errors can happen on reflection, resource, JNI, and serialization accesses. | ||
|
||
Note: '--exact-reachability-metadata' will become the default in future versions of Native Image. It is recommended to adopt the mode early | ||
to avoid breakage during migration to newer GraalVM versions. | ||
|
||
If errors occur in third-party code, exact reachability metadata can be applied only to a single package with | ||
'--exact-reachability-metadata=pkg'. To apply to whole jars, modules, and class-path entries please use | ||
'--exact-reachability-metadata-path'. Using '--exact-reachability-metadata=<pkg>' with arguments is allowed in every scope: | ||
|
||
1. On command line | ||
2. Embedded in a 'native-image.properties' file of some zip/jar file on module-path | ||
3. Embedded in a 'native-image.properties' file of some zip/jar file on class-path | ||
|
||
If used without arguments (only '--exact-reachability-metadata'), the errors will be thrown when calling the corresponding query from any | ||
class in scope of the option. Using '--exact-reachability-metadata' without arguments is only allowed on command line or when | ||
embedded in a 'native-image.properties' file of some zip/jar file on the module-path (but not on class-path). | ||
In the module path case, the option will cause all classes of the module to trigger missing registration errors. | ||
If used without arguments on command line all classes will trigger missing registration errors. | ||
|
||
If the option is embedded in 'native-image.properties' file in some zip/jar file all class-names | ||
and package-names passed to the option have to be found in the zip/jar files the option is embedded | ||
in. Using '--exact-reachability-metadata' with arguments on command line does not have that restriction. |
10 changes: 10 additions & 0 deletions
10
...m.oracle.svm.core/src/com/oracle/svm/core/doc-files/ExactReachabilityMetadataPathHelp.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
Trigger exact handling of reflection, resources, JNI, and serialization from all types in the given class-path or module-path entries. | ||
|
||
This option requires arguments that are of the same type as the arguments passed via -p (--module-path) or -cp (--class-path): | ||
|
||
--exact-reachability-metadata-path <class-search path of directories and jar files> | ||
|
||
The given entries are searched and all classes inside are registered as '--exact-reachability-metadata' classes. | ||
|
||
This option is only allowed to be used on command line. The option will be rejected if it is provided | ||
by 'Args' in a 'native-image.properties' file that is embedded in a jar file. |
19 changes: 0 additions & 19 deletions
19
...evm/src/com.oracle.svm.core/src/com/oracle/svm/core/doc-files/MissingRegistrationHelp.txt
This file was deleted.
Oops, something went wrong.
11 changes: 0 additions & 11 deletions
11
...rc/com.oracle.svm.core/src/com/oracle/svm/core/doc-files/MissingRegistrationPathsHelp.txt
This file was deleted.
Oops, something went wrong.