[GR-57814] Prevent emission of typeReachable in reachability-metadata.json #9664
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 contains bugfixes to the
native-image-configure
tool, to make sure it outputs correct metadata when converting*-config.json
files using the old format into the newreachability-metadata.json
. The fixes are in separate commits and are as follows:typeReachable
conditions astypeReached
. This is necessary to ensure no duplication during configuration merging, but is undesirable in the builder, who needs to maintain this distinction to avoid breaking existing workflows;typeReachable
conditions in*-config.json
files andtypeReached
conditions inreachability-metadata.json
. This is linked to the previous fix and necessary when the tools have to fallback to emitting*-config.json
files due to elements being unsupported in the new format;\Qsimple/path/without/special/characters\E
as globs. The latter part is not strictly needed but helps as a mitigation of the previously mentioned issues by limiting the amount of resource patterns being emitted, since those are deprecated and not accepted inreachability-metadata.json
;ParserConfigurationAdapter
acceptalwaysTrue
when registering elements of an existing type. This is necessary to avoid making the parser aware of whether it is run on the builder or the agent/configure tool. Otherwise we would need to conditionally register reflective elements (methods, fields, etc.) when parsing a"type"
metadata entry in the builder only.ProxyConfiguration
andResourceConfiguration
to rely onJsonPrettyPrinter
for formatting, like what is done forreachability-metadata.json
. This is a cosmetic change but should be backported alongside the fixes in this PR to ensure consistent output from the release of the new metadata format.