diff --git a/docs/reference-manual/native-image/FFM-API.md b/docs/reference-manual/native-image/FFM-API.md index 9c90575af2b6..a4cad33a1c36 100644 --- a/docs/reference-manual/native-image/FFM-API.md +++ b/docs/reference-manual/native-image/FFM-API.md @@ -754,4 +754,4 @@ This is also why the `native-image` tool currently disallows native `MemorySegme * [Interoperability with Native Code](InteropWithNativeCode.md) * [Collect Metadata with the Tracing Agent](AutomaticMetadataCollection.md) * [Reachability Metadata](ReachabilityMetadata.md) -* [reachability-metadata-schema-v1.1.0.json](https://github.com/oracle/graal/blob/master/docs/reference-manual/native-image/assets/reachability-metadata-schema-v1.1.0.json) +* [reachability-metadata-schema-v1.2.0.json](https://github.com/oracle/graal/blob/master/docs/reference-manual/native-image/assets/reachability-metadata-schema-v1.2.0.json) diff --git a/docs/reference-manual/native-image/ReachabilityMetadata.md b/docs/reference-manual/native-image/ReachabilityMetadata.md index 7d96c01fc6fd..c26d7fcb884c 100644 --- a/docs/reference-manual/native-image/ReachabilityMetadata.md +++ b/docs/reference-manual/native-image/ReachabilityMetadata.md @@ -124,7 +124,7 @@ Computing metadata in code can be achieved in two ways: ## Specifying Metadata with JSON All metadata specified in the _reachability-metadata.json_ file that is located in any of the classpath entries at _META-INF/native-image/\\/\\/_. -The JSON schema for the reachability metadata is defined in [reachability-metadata-schema-v1.1.0.json](https://github.com/oracle/graal/blob/master/docs/reference-manual/native-image/assets/reachability-metadata-schema-v1.1.0.json). +The JSON schema for the reachability metadata is defined in [reachability-metadata-schema-v1.2.0.json](https://github.com/oracle/graal/blob/master/docs/reference-manual/native-image/assets/reachability-metadata-schema-v1.2.0.json). A sample _reachability-metadata.json_ file can be found [in the sample section](#sample-reachability-metadata). The _reachability-metadata.json_ configuration contains a single object with one field for each type of metadata. Each field in the top-level object contains an array of *metadata entries*: diff --git a/docs/reference-manual/native-image/assets/reachability-metadata-schema-v1.2.0.json b/docs/reference-manual/native-image/assets/reachability-metadata-schema-v1.2.0.json new file mode 120000 index 000000000000..4a833a4f17f9 --- /dev/null +++ b/docs/reference-manual/native-image/assets/reachability-metadata-schema-v1.2.0.json @@ -0,0 +1 @@ +../../../../substratevm/schemas/reachability-metadata-schema-v1.2.0.json \ No newline at end of file diff --git a/sdk/mx.sdk/mx_sdk.py b/sdk/mx.sdk/mx_sdk.py index a93d4073e9a3..f70a953b348d 100644 --- a/sdk/mx.sdk/mx_sdk.py +++ b/sdk/mx.sdk/mx_sdk.py @@ -54,6 +54,7 @@ import datetime import shutil import tempfile +from typing import Iterable, Tuple from mx_bisect import define_bisect_default_build_steps from mx_bisect_strategy import BuildStepsGraalVMStrategy @@ -262,6 +263,117 @@ def jlink_new_jdk(jdk, dst_jdk_dir, module_dists, ignore_dists, use_upgrade_module_path=use_upgrade_module_path, default_to_jvmci=default_to_jvmci) + +def create_jsonschema_validator(schema_path): + """Create and return a jsonschema Validator for the schema at the given file path. Abort on missing jsonschema or invalid schema.""" + import json + try: + with open(schema_path, "r", encoding="utf-8") as f: + schema = json.load(f) + except json.JSONDecodeError as e: + mx.abort(f'Failed to parse JSON in schema file "{schema_path}" at line {e.lineno}, column {e.colno}: {e.msg}') + except OSError as e: + mx.abort(f'I/O error when opening schema file "{schema_path}": {e}') + + try: + import jsonschema # type: ignore + except ImportError as e: + mx.abort( + 'Python module "jsonschema" is required to validate reachability metadata but was not found. ' + 'Install it with: \n\npython3 -m pip install --user jsonschema \n\n or \n\npip3 install jsonschema\n\n' + f'Original error: {e}') + try: + if hasattr(jsonschema, 'Draft202012Validator'): + return jsonschema.Draft202012Validator(schema) # type: ignore[attr-defined] + else: + return jsonschema.Draft7Validator(schema) # type: ignore + except (jsonschema.exceptions.SchemaError, TypeError) as e: + mx.abort(f'Invalid reachability metadata schema: {e}') + + +def validate_json_file_with_validator(validator, file_path): + """Validates a JSON file against the provided Validator. Returns a list of detailed error strings; empty if valid.""" + import json + try: + with open(file_path, 'r', encoding='utf-8') as f: + data = json.load(f) + except json.JSONDecodeError as e: + mx.abort(f'Invalid JSON syntax at line {e.lineno}, column {e.colno}: {e.msg}') + except OSError as e: + mx.abort(f'I/O error: {e}') + + # Use jsonschema's ValidationError string representation to produce messages in the form: + # Failed validating '' in schema[...] : + # { ... failing subschema ... } + # + # On instance[...] : + # + errors = [] + for err in validator.iter_errors(data): + errors.append(str(err)) + return errors + + +def validate_dir_files_with_file_schema_pairs(dir_with_json: str, json_and_schema_file_pairs: Iterable[Tuple[str, str]]) -> None: + """ + Validate JSON files in a directory against corresponding JSON Schemas. + + This scans the given directory for each JSON filename listed in json_and_schema_file_pairs. + For every file that exists, it validates the file against the associated schema located in + the Native Image docs assets directory. Validation uses a pre-built jsonschema.Validator + per schema to ensure consistent behavior and error reporting. + + Parameters: + - dir_with_json: Directory path containing JSON files to validate. + - json_and_schema_file_pairs: Iterable of (json_filename, schema_filename) pairs. + + Behavior: + - Logs each validation attempt. + - Accumulates all validation errors across files. + - Calls mx.abort with a detailed message if any error is found; otherwise returns None. + """ + assets_dir = os.path.join(_suite.dir, '..', 'docs', 'reference-manual', 'native-image', 'assets') + + # Build validators for all known schema files using CE helper to ensure uniform behavior and error reporting. + validators = {} + for _, schema_file in json_and_schema_file_pairs: + schema_path = os.path.join(assets_dir, schema_file) + validators[schema_file] = create_jsonschema_validator(schema_path) + + validation_errors_by_file = {} + for json_filename, schema_file in json_and_schema_file_pairs: + json_path = os.path.join(dir_with_json, json_filename) + if os.path.exists(json_path): + mx.log(f'Validating {json_path} against {schema_file}...') + errs = validate_json_file_with_validator(validators[schema_file], json_path) + if errs: + validation_errors_by_file[(json_path, schema_file)] = errs + + if validation_errors_by_file: + sections = [] + for (json_path, schema_file), errs in validation_errors_by_file.items(): + header = ( + "-------------------------------------------------------------------------------\n" + f"File: {json_path}\n" + f"Schema: {schema_file}\n" + "-------------------------------------------------------------------------------" + ) + sections.append(header + "\n\n" + "\n\n".join(errs)) + msg = "Unable to validate JSON file(s) against the schema:\n\n" + "\n\n".join(sections) + mx.abort(msg) + # Validate any present config files + validation_errors = [] + for json_filename, schema_file in json_and_schema_file_pairs: + json_path = os.path.join(dir_with_json, json_filename) + if os.path.exists(json_path): + mx.log(f'Validating {json_path} against {schema_file}...') + errs = validate_json_file_with_validator(validators[schema_file], json_path) + validation_errors.extend(errs) + + if validation_errors: + mx.abort('Unable to validate JSON file against the schema:\n\n' + '\n\n'.join(validation_errors)) + + class GraalVMJDKConfig(mx.JDKConfig): # Oracle JDK includes the libjvmci compiler, allowing it to function as GraalVM. diff --git a/substratevm/CHANGELOG.md b/substratevm/CHANGELOG.md index 81b4b4d18a1d..af557ccddf42 100644 --- a/substratevm/CHANGELOG.md +++ b/substratevm/CHANGELOG.md @@ -9,6 +9,8 @@ This changelog summarizes major changes to GraalVM Native Image. * (GR-2092) Add jitdump support for recording run-time compilation metadata for perf (see PerfProfiling.md). Can be enabled with `-g -H:+RuntimeDebugInfo -H:RuntimeDebugInfoFormat=jitdump`. * (GR-69572) Deprecates the `native-image-inspect` tool. To extract embedded SBOMs, use `native-image-configure extract-sbom --image-path=`. * (GR-70136) Add a new tool `--tool:llvm` for the LLVM backend of Native Image. +* (GR-68984) Ship the `reachability-metadata-schema.json` together with GraalVM at `/lib/svm/schemas/reachability-metadata-schema.json`. +* (GR-68984) Improve the schema to capture detailed constraints about each element in the `reachability-metadata-schema.json`. ## GraalVM 25 * (GR-52276) (GR-61959) Add support for Arena.ofShared(). diff --git a/substratevm/mx.substratevm/mx_substratevm.py b/substratevm/mx.substratevm/mx_substratevm.py index daabdad96e2d..b26ce6ba1fc6 100644 --- a/substratevm/mx.substratevm/mx_substratevm.py +++ b/substratevm/mx.substratevm/mx_substratevm.py @@ -43,6 +43,7 @@ import mx_compiler import mx_gate import mx_unittest +import mx_sdk import mx_sdk_vm import mx_sdk_vm_impl import mx_javamodules @@ -525,13 +526,6 @@ def help_stdout_check(output): with Task('Validate JSON build info', tasks, tags=[GraalTags.helloworld]) as t: if t: - import json - try: - from jsonschema import validate as json_validate - from jsonschema.exceptions import ValidationError, SchemaError - except ImportError: - mx.abort('Unable to import jsonschema') - json_and_schema_file_pairs = [ ('build-artifacts.json', 'build-artifacts-schema-v0.9.0.json'), ('build-output.json', 'build-output-schema-v0.9.4.json'), @@ -540,19 +534,7 @@ def help_stdout_check(output): build_output_file = join(svmbuild_dir(), 'build-output.json') helloworld(['--output-path', svmbuild_dir()] + svm_experimental_options([f'-H:BuildOutputJSONFile={build_output_file}', '-H:+GenerateBuildArtifactsFile'])) - try: - for json_file, schema_file in json_and_schema_file_pairs: - with open(join(svmbuild_dir(), json_file)) as f: - json_contents = json.load(f) - with open(join(suite.dir, '..', 'docs', 'reference-manual', 'native-image', 'assets', schema_file)) as f: - schema_contents = json.load(f) - json_validate(json_contents, schema_contents) - except IOError as e: - mx.abort(f'Unable to load JSON build info: {e}') - except ValidationError as e: - mx.abort(f'Unable to validate JSON build info against the schema: {e}') - except SchemaError as e: - mx.abort(f'JSON schema not valid: {e}') + mx_sdk.validate_dir_files_with_file_schema_pairs(svmbuild_dir(), json_and_schema_file_pairs) with Task('java agent tests', tasks, tags=[GraalTags.java_agent]) as t: if t: diff --git a/substratevm/mx.substratevm/suite.py b/substratevm/mx.substratevm/suite.py index d807468ccc02..b6271d04235d 100644 --- a/substratevm/mx.substratevm/suite.py +++ b/substratevm/mx.substratevm/suite.py @@ -2475,6 +2475,7 @@ "clibraries/" : ["extracted-dependency:substratevm:SVM_HOSTED_NATIVE"], "builder/clibraries/" : ["extracted-dependency:substratevm:SVM_HOSTED_NATIVE"], "builder/lib/" : ["dependency:com.oracle.svm.native.reporterchelper"], + "schemas/reachability-metadata-schema.json" : ["file:schemas/reachability-metadata-schema-v1.2.0.json"], # Note: `ld64.lld` is a symlink to `lld`, but it is dereferenced here. "bin/" : ["extracted-dependency:LLVM_LLD_STANDALONE/bin/ld64.lld"], }, diff --git a/substratevm/schemas/reachability-metadata-schema-v1.2.0.json b/substratevm/schemas/reachability-metadata-schema-v1.2.0.json new file mode 100644 index 000000000000..ef4ca27a589e --- /dev/null +++ b/substratevm/schemas/reachability-metadata-schema-v1.2.0.json @@ -0,0 +1,458 @@ +{ + "$schema": "https://json-schema.org/draft/2019-09/schema", + "$id": "https://github.com/oracle/graal/blob/master/docs/reference-manual/native-image/assets/reachability-metadata-schema-v1.2.0.json", + "title": "JSON schema for the reachability metadata used by GraalVM Native Image", + "version": "1.2.0", + "type": "object", + "default": {}, + "properties": { + "comment": { + "title": "Comment(s) applying to the whole file (e.g., generation date, author, etc.)", + "oneOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ], + "default": "" + }, + "reflection": { + "title": "Metadata to ensure elements are accessible via reflection", + "type": "array", + "default": [], + "items": { + "title": "Elements that should be registered for reflection for a specified type", + "type": "object", + "required": ["type"], + "properties": { + "reason": { + "$ref": "#/$defs/reason" + }, + "condition": { + "$ref": "#/$defs/condition" + }, + "type": { + "title": "Type descriptor of the class that should be registered for reflection", + "$ref": "#/$defs/type" + }, + "methods": { + "title": "List of methods that should be registered for the type declared in ", + "type": "array", + "default": [], + "items": { + "title": "Method descriptor of the method that should be registered for reflection", + "$ref": "#/$defs/method" + } + }, + "fields": { + "title": "List of class fields that can be read or written to for the type declared in ", + "type": "array", + "default": [], + "items": { + "title": "Field descriptor of the field that should be registered for reflection", + "type": "object", + "properties": { + "name": { + "title": "Name of the field that should be registered for reflection", + "type": "string", + "pattern": "^[^.;\\[/]+$" + } + }, + "required": [ + "name" + ], + "additionalProperties": false + } + }, + "allDeclaredMethods": { + "title": "Register all declared methods from the type for reflective invocation", + "type": "boolean", + "default": false + }, + "allDeclaredFields": { + "title": "Register all declared fields from the type for reflective access", + "type": "boolean", + "default": false + }, + "allDeclaredConstructors": { + "title": "Register all declared constructors from the type for reflective invocation", + "type": "boolean", + "default": false + }, + "allPublicMethods": { + "title": "Register all public methods from the type for reflective invocation", + "type": "boolean", + "default": false + }, + "allPublicFields": { + "title": "Register all public fields from the type for reflective access", + "type": "boolean", + "default": false + }, + "allPublicConstructors": { + "title": "Register all public constructors from the type for reflective invocation", + "type": "boolean", + "default": false + }, + "unsafeAllocated": { + "title": "Allow objects of this class to be instantiated with a call to jdk.internal.misc.Unsafe#allocateInstance or JNI's AllocObject", + "type": "boolean", + "default": false + }, + "serializable": { + "title": "Allow objects of this class to be serialized and deserialized", + "type": "boolean", + "default": false + }, + "jniAccessible": { + "title": "Register the type, including all registered fields and methods, for runtime JNI access", + "type": "boolean", + "default": false + } + }, + "additionalProperties": false + } + }, + "resources": { + "title": "Metadata to ensure resources are accessible", + "type": "array", + "default": [], + "items": { + "oneOf": [ + { + "title": "Resource that should be accessible", + "type": "object", + "properties": { + "reason": { + "$ref": "#/$defs/reason" + }, + "condition": { + "$ref": "#/$defs/condition" + }, + "module": { + "title": "Module containing the resource", + "type": "string", + "default": "" + }, + "glob": { + "title": "Resource name or pattern matching multiple resources (accepts * and ** wildcards)", + "type": "string" + } + }, + "required": [ + "glob" + ], + "additionalProperties": false + }, + { + "title": "Resource bundle that should be available", + "type": "object", + "properties": { + "reason": { + "$ref": "#/$defs/reason" + }, + "condition": { + "$ref": "#/$defs/condition" + }, + "module": { + "title": "Module containing the resource bundle", + "type": "string", + "default": "" + }, + "bundle": { + "title": "Resource bundle name", + "type": "string" + } + }, + "required": [ + "bundle" + ], + "additionalProperties": false + } + ] + } + }, + "foreign": { + "properties": { + "downcalls": { + "default": [], + "items": { + "properties": { + "reason": { + "$ref": "#/$defs/reason" + }, + "condition": { + "$ref": "#/$defs/condition" + }, + "returnType": { + "type": "string", + "title": "Memory layout definition (allows canonical layouts; see `java.lang.foreign.Linker`)" + }, + "parameterTypes": { + "default": [], + "items": { + "type": "string", + "title": "Memory layout definition (allows canonical layouts; see `java.lang.foreign.Linker`)" + }, + "type": "array", + "title": "List of the function descriptor's parameter types" + }, + "options": { + "type": "object", + "title": "Linker options (see `java.lang.foreign.Linker.Option`)", + "properties": { + "captureCallState": { + "type": "boolean", + "title": "Specifies whether a call state should be captured. The specific states to capture are determined at run time. See also: `java.lang.foreign.Linker.Option.captureCallState`" + }, + "critical": { + "type": "object", + "title": "See `java.lang.foreign.Linker.Option.critical`", + "properties": { + "allowHeapAccess": { + "type": "boolean" + } + }, + "additionalProperties": false + }, + "firstVariadicArg": { + "type": "integer", + "title": "See `java.lang.foreign.Linker.Option.firstVariadicArg`" + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false, + "required": ["returnType", "parameterTypes"], + "type": "object", + "title": "Function descriptor to be registered for a downcall" + }, + "type": "array", + "title": "List of function descriptors that should be registered for downcalls" + }, + "upcalls": { + "default": [], + "items": { + "properties": { + "reason": { + "$ref": "#/$defs/reason" + }, + "condition": { + "$ref": "#/$defs/condition" + }, + "returnType": { + "type": "string", + "title": "Memory layout definition (allows canonical layouts; see `java.lang.foreign.Linker`)" + }, + "parameterTypes": { + "default": [], + "items": { + "type": "string", + "title": "Memory layout definition (allows canonical layouts; see `java.lang.foreign.Linker`)" + }, + "type": "array", + "title": "List of the function descriptor's parameter types" + }, + "options": { + "type": "object", + "title": "Linker options (see `java.lang.foreign.Linker.Option`)", + "description": "Currently, no linker options are allowed for upcalls. This may change in the future.", + "properties": { }, + "additionalProperties": false + } + }, + "additionalProperties": false, + "required": ["returnType", "parameterTypes"], + "type": "object", + "title": "Function descriptor to be registered for an upcall" + }, + "type": "array", + "title": "List of function descriptors that should be registered for upcalls" + }, + "directUpcalls": { + "default": [], + "items": { + "properties": { + "reason": { + "$ref": "#/$defs/reason" + }, + "condition": { + "$ref": "#/$defs/condition" + }, + "class": { + "$ref": "#/$defs/className", + "title": "Fully-qualified class name (e.g., `org.package.OuterClass$InnerClass`)" + }, + "method": { + "type": "string", + "title": "Method name" + }, + "returnType": { + "type": "string", + "title": "Memory layout definition (allows canonical layouts; see `java.lang.foreign.Linker`)" + }, + "parameterTypes": { + "default": [], + "items": { + "type": "string", + "title": "Memory layout definition (allows canonical layouts; see `java.lang.foreign.Linker`)" + }, + "type": "array", + "title": "List of the function descriptor's parameter types" + }, + "options": { + "type": "object", + "title": "Linker options (see `java.lang.foreign.Linker.Option`)", + "description": "Currently, no linker options are allowed for direct upcalls. This may change in the future.", + "properties": { }, + "additionalProperties": false + } + }, + "additionalProperties": false, + "required": ["class", "method"], + "type": "object", + "title": "Java method and function descriptor to be registered for a direct upcall" + }, + "type": "array", + "title": "List of Java methods and function descriptors that should be registered for direct upcalls" + } + }, + "type": "object", + "additionalProperties": false, + "title": "JSON schema for the FFM API configuration used by GraalVM Native Image", + "description": "For a description and examples of writing an FFM API configuration, see: https://github.com/oracle/graal/blob/master/docs/reference-manual/native-image/FFM-API.md" + } + }, + "required": [], + "additionalProperties": false, + + "$defs": { + "className": { + "type": "string", + "pattern": "^[^.;\\[/]+(\\.[^.;\\[/]+)*$" + }, + "typeName": { + "type": "string", + "pattern": "^[^.;\\[/]+(\\.[^.;\\[/]+)*(\\[])*$" + }, + "reason": { + "title": "Reason(s) for including this element (e.g., needed for establishing connections, or needed by method X#Y for task Z)", + "oneOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ], + "default": "" + }, + "condition": { + "title": "Condition used to determine if the element will be accessible at run time", + "type": "object", + "properties": { + "typeReached": { + "title": "Type descriptor of a class that must be reached in order to allow access to the element", + "$ref": "#/$defs/type" + } + }, + "required": [ + "typeReached" + ], + "additionalProperties": false + }, + "type": { + "title": "Type descriptors used by GraalVM Native Image metadata files", + "oneOf": [ + { + "$ref": "#/$defs/typeName" + }, + { + "type": "object", + "properties": { + "proxy": { + "title": "A list of interfaces defining the proxy class", + "type": "array", + "items": { + "title": "Fully-qualified name of the interface defining the proxy class", + "$ref": "#/$defs/className" + } + }, + "lambda": { + "title": "Lambda class descriptor", + "type": "object", + "properties": { + "declaringClass": { + "title": "The class in which the lambda class is defined", + "$ref": "#/$defs/className" + }, + "declaringMethod": { + "title": "The method in which the lambda class is defined", + "$ref": "#/$defs/method" + }, + "interfaces": { + "title": "Non-empty list of interfaces implemented by the lambda class", + "type": "array", + "items": { + "title": "Fully-qualified name of the interface implemented by the lambda class", + "$ref": "#/$defs/className" + }, + "minItems": 1 + } + }, + "required": [ + "declaringClass", + "interfaces" + ], + "additionalProperties": false + } + }, + "oneOf": [ + { + "required": [ + "proxy" + ] + }, + { + "required": [ + "lambda" + ] + } + ], + "additionalProperties": false + } + ] + }, + "method": { + "title": "Method descriptors used by GraalVM Native Image metadata files", + "type": "object", + "properties": { + "name": { + "title": "Method name that should be registered for this class", + "type": "string", + "pattern": "^[^.;\\[/]+$" + }, + "parameterTypes": { + "items": { + "title": "List of the method's parameter types", + "$ref": "#/$defs/typeName" + }, + "type": "array" + } + }, + "required": [ + "name", "parameterTypes" + ], + "additionalProperties": false + } + } +} diff --git a/substratevm/src/com.oracle.svm.configure/src/com/oracle/svm/configure/ClassNameSupport.java b/substratevm/src/com.oracle.svm.configure/src/com/oracle/svm/configure/ClassNameSupport.java index a2f83bfbe040..5a1433ea9141 100644 --- a/substratevm/src/com.oracle.svm.configure/src/com/oracle/svm/configure/ClassNameSupport.java +++ b/substratevm/src/com.oracle.svm.configure/src/com/oracle/svm/configure/ClassNameSupport.java @@ -181,6 +181,9 @@ private static boolean isValidWrappingArrayElementType(String name, int startInd } private static boolean isValidFullyQualifiedClassName(String name, int startIndex, int endIndex, char packageSeparator) { + if (name.isEmpty()) { + return false; + } int lastPackageSeparatorIndex = -1; for (int i = startIndex; i < endIndex; ++i) { char current = name.charAt(i); diff --git a/substratevm/src/com.oracle.svm.configure/src/com/oracle/svm/configure/ReflectionMetadataParser.java b/substratevm/src/com.oracle.svm.configure/src/com/oracle/svm/configure/ReflectionMetadataParser.java index ed81585e3aa2..d6b02b5fc6df 100644 --- a/substratevm/src/com.oracle.svm.configure/src/com/oracle/svm/configure/ReflectionMetadataParser.java +++ b/substratevm/src/com.oracle.svm.configure/src/com/oracle/svm/configure/ReflectionMetadataParser.java @@ -88,9 +88,9 @@ protected void parseClass(EconomicMap data) { for (T clazz : classes) { delegate.registerType(conditionResult.get(), clazz); - delegate.registerDeclaredClasses(queryCondition, clazz); - delegate.registerPublicClasses(queryCondition, clazz); if (!jniParser) { + delegate.registerPublicClasses(queryCondition, clazz); + delegate.registerDeclaredClasses(queryCondition, clazz); delegate.registerRecordComponents(queryCondition, clazz); delegate.registerPermittedSubclasses(queryCondition, clazz); delegate.registerNestMembers(queryCondition, clazz); diff --git a/substratevm/src/com.oracle.svm.core/src/com/oracle/svm/core/configure/ConfigurationFiles.java b/substratevm/src/com.oracle.svm.core/src/com/oracle/svm/core/configure/ConfigurationFiles.java index 74b903233060..f6d399ba0a97 100644 --- a/substratevm/src/com.oracle.svm.core/src/com/oracle/svm/core/configure/ConfigurationFiles.java +++ b/substratevm/src/com.oracle.svm.core/src/com/oracle/svm/core/configure/ConfigurationFiles.java @@ -130,7 +130,7 @@ public static final class Options { AccumulatingLocatableMultiOptionValue.Strings.buildWithCommaDelimiter()); @Option(help = "Resources describing reachability metadata needed for the program " + - "https://github.com/oracle/graal/blob/master/docs/reference-manual/native-image/assets/reachability-metadata-schema-v1.1.0.json", type = OptionType.User)// + "https://github.com/oracle/graal/blob/master/docs/reference-manual/native-image/assets/reachability-metadata-schema-v1.2.0.json", type = OptionType.User)// public static final HostedOptionKey ReachabilityMetadataResources = new HostedOptionKey<>( AccumulatingLocatableMultiOptionValue.Strings.buildWithCommaDelimiter());