Skip to content

[GR-63591] Include resource bundles in resource configuration #11313

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

Merged
merged 3 commits into from
Jun 6, 2025

Conversation

graalvmbot
Copy link
Collaborator

This PR moves the resource bundle registrations in reachability-metadata.json to the "resources" section. As a result, reachability-metadata.json files emitted by Native Image now contain only the "reflection" and "resources" sections.

Format
The format used is very similar to the previously used one, with the single difference being that the name of the bundle is given by the "bundle" field instead of "name", in order to be able to differentiate resource bundles from regular resources.
This change also formalizes the deprecation of "locales" (not needed since #9694) and "classNames" (supported through reflection) in the bundle definition object.
A resource bundle registration now looks like this:

{
    "resources": [
        {
            "bundle": "fully.qualified.resource.BundleName"
        }
    ]
}

Backwards compatibility
This change is fully backwards compatible. Registrations in the "bundles" section, in both reachability-metadata.json and resource-config.json files, are still parsed correctly and will be until this format is no longer used by the community.
This change will also be backported to the previous LTS versions of GraalVM in order for those to be able to parse reachability-metadata.json files emitted by Native Image from this point onwards.

Configuration merging
When merging configuration files, one of which contains resource bundle registrations in the previous format, all of them will be merged into a reachability-metadata.json file using the new format.

@oracle-contributor-agreement oracle-contributor-agreement bot added the OCA Verified All contributors have signed the Oracle Contributor Agreement. label Jun 3, 2025
@graalvmbot graalvmbot merged commit 809500b into master Jun 6, 2025
12 of 13 checks passed
@graalvmbot graalvmbot deleted the lottet/GR-63591-bundles-as-resources branch June 6, 2025 06:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
OCA Verified All contributors have signed the Oracle Contributor Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants