[GR-73955] Add error messages for unsatisfied run-time conditions.#13232
Open
graalvmbot wants to merge 1 commit intomasterfrom
Open
[GR-73955] Add error messages for unsatisfied run-time conditions.#13232graalvmbot wants to merge 1 commit intomasterfrom
graalvmbot wants to merge 1 commit intomasterfrom
Conversation
8c11eea to
87cf966
Compare
Thread RuntimeDynamicAccessMetadata through reflection, resource, and serialization lookup/reporting paths, and include unsatisfied runtime conditions in Missing*RegistrationError messages when matching metadata exists but conditions are not satisfied. Tighten condition-aware lookup behavior in DynamicHub/reflection paths, preserve serialization constructor-accessor metadata across image layers, add proxy interface-order hints for near matches, and fix createURLs/getResources missing-metadata reporting for unsatisfied resource include patterns (including globs). Also add a TrackConditionSatisfied testing option for condition transitions.
87cf966 to
1dc1d2f
Compare
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR improves missing-registration diagnostics when reachability metadata exists, but the matching entry is inactive because its runtime
typeReachedconditions are not satisfied.Today those cases are often reported as if metadata were missing entirely. That is misleading for users because the required action is different: the fix may be to make an existing condition reachable at run time, not to add new metadata. The most
visible failure was resource lookup via
ClassLoader::getResources/Resources.createURLs, but the same issue also showed up in reflection, dynamic proxies, serialization, and related runtime lookup paths.What changed
Missing-registration errors now distinguish between:
MissingReflectionRegistrationError,MissingResourceRegistrationError, andMissingSerializationRegistrationErrornow acceptRuntimeDynamicAccessMetadata.Resource diagnostics were fixed end-to-end, with the primary fix in the
ClassLoader::getResources/Resources.createURLspath.Reflection and class-query handling was tightened so condition checks happen consistently at runtime.
AccessibleObjects, so invocation and field-access failures can report the correct inactive condition.DynamicHub/ClassRegistriesclass-query paths were updated so name-based lookups and array-class access behave consistently when conditional reflection metadata is present but unsatisfied.Proxy diagnostics were improved in two ways.
Serialization metadata propagation was tightened.
A few internal reflection users were updated to match the stricter class-query behavior.
Added testing/debugging hooks for validating condition behavior.
-H:TrackConditionSatisfied=<fqcn|*>can be used to trace when a runtimetypeReachedcondition becomes satisfied.-H:+TrackReflectionClassQueryChecksprovides concise tracing for reflection class-query checks.Testing
Examples