Skip to content

Remove the usage of the global metadata/index.json from the nbt plugins#829

Merged
jormundur00 merged 6 commits intomasterfrom
jormundur00/global-index-removal
Feb 11, 2026
Merged

Remove the usage of the global metadata/index.json from the nbt plugins#829
jormundur00 merged 6 commits intomasterfrom
jormundur00/global-index-removal

Conversation

@jormundur00
Copy link
Member

In this PR, we remove the legacy repository-wide metadata/index.json and switch fully to per-module index.json files as the single source of truth for reachability metadata discovery and dependency expansion.

Motivation:

  • The repository structure already maintains per-module metadata at groupId/artifactId/index.json. The outer metadata/index.json was redundant and a frequent source of confusion during packaging and updates.
  • Removing the global index reduces duplication, simplifies metadata publishing, and aligns directory scanning with the canonical per-module layout.

Summary of changes:

  • Eliminate all usage of the top-level metadata/index.json. Discovery and resolution now operate exclusively on per-module index.json.
  • Keep and clarify one-hop “requires” expansion at module level:
    • For a requested module (G:A), we include its own module directory and the conventional directories of any modules listed under "requires" in G/A/index.json.
  • Maintain behavior expected by downstream consumers and tests:
    • Modules which declare actual metadata will be included as configuration directories.
    • Aggregator modules (like io.netty:netty-all) are included themselves and also expand their “requires” to bring in dependent module directories.

As running changes in this PR depend on the reachability metadata repository PR which removes this metadata/index.json file, and the reachability metadata PR depends on buildtools working with this new format to test in the CI, the merge/release process of these PRs should have the following order:

  1. The reachability metadata PR should be merged first (running CI on the branch of this buildtools PR to complete successfully),
  2. The next reachability metadata release should be dispatched so that buildtools can use it in this PR,
  3. This PR should include the bump to the new reachability metadata version and get merged ASAP,
  4. Reachabilty metadata repository CI will work on the latest SNAPSHOT of buildtools until the new NBT release is released (which should be scheduled as soon as the PR is merged),
  5. We open a PR on the reachability metadata repository to use the newest release of buildtools and no longer use snapshots in the CI.

Please review this PR in conjunction with the reachability metadata PR.

The CI tests in this PR all fail due to:

* What went wrong:
Could not determine the dependencies of task ':nativeTestCompile'.
> Failed to create service 'nativeConfigurationService'.
   > Could not create an instance of type org.graalvm.buildtools.gradle.internal.GraalVMReachabilityMetadataService.
      > The configured GraalVM reachability metadata repository at /home/jovan/NBT/native-build-tools/native-gradle-plugin/build/tmp/configCacheFunctionalTest/work/.gradle-test-kit/native-build-tools/repositories/480a9c4102624914066dd67a0bb0f0b8f6d5c1e8/exploded contains more schema files than supported by this version of Native Build Tools. Found 3 files under 'schemas' but exactly 2 are supported. Please update your Native Build Tools to a newer version which supports the newer schemas.

(as the reachability metadata used in the latest release supports 3 schema files). Without removing the check for the 3rd schema (the global metadata/index.json schema) the CI tests all pass. Once the reachability metadata PR is merged and the new release is out, the CI on this PR will be fixed.

Fixes: #802

@jormundur00 jormundur00 requested review from melix and vjovanov February 2, 2026 13:29
@jormundur00 jormundur00 self-assigned this Feb 2, 2026
@jormundur00 jormundur00 added the enhancement New feature or request label Feb 2, 2026
@oracle-contributor-agreement oracle-contributor-agreement bot added the OCA Verified All contributors have signed the Oracle Contributor Agreement. label Feb 2, 2026
@jormundur00 jormundur00 marked this pull request as draft February 2, 2026 15:03
@jormundur00 jormundur00 force-pushed the jormundur00/global-index-removal branch 4 times, most recently from cfca9a4 to 290ef72 Compare February 4, 2026 08:39
@jormundur00 jormundur00 marked this pull request as ready for review February 4, 2026 09:54
@jormundur00
Copy link
Member Author

With the usage of the 0.3.34-prerelease version of reachability metadata (which includes the yet to be merged metadata/index.json removal PR), all the CI tests pass on both the reachability metadata and buildtools side.

The plan is to, once both PRs are approved for merging:

  1. Merge the reachability metadata PR first,
  2. Release the 0.3.34 version of reachability metadata,
  3. Bump the reachability metadata version in this PR from 0.3.34-prerelease to 0.3.34,
  4. Merge this PR.

@vjovanov @melix please take a look at both this PR and the Reachability Metadata PR when you have the time, as the 1.0-M1 release is scheduled for the 12th of February, and this is a major PR that blocks other issues also required for this release.

vjovanov
vjovanov previously approved these changes Feb 10, 2026
@jormundur00 jormundur00 force-pushed the jormundur00/global-index-removal branch 3 times, most recently from 776f79e to 3b416ad Compare February 11, 2026 07:26
@jormundur00 jormundur00 force-pushed the jormundur00/global-index-removal branch from 3b416ad to 888dc2a Compare February 11, 2026 07:27
vjovanov
vjovanov previously approved these changes Feb 11, 2026
@jormundur00 jormundur00 merged commit fe065ce into master Feb 11, 2026
610 of 611 checks passed
@jormundur00 jormundur00 deleted the jormundur00/global-index-removal branch February 11, 2026 11:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request OCA Verified All contributors have signed the Oracle Contributor Agreement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Adapt Native Build Tools for the removal of the global index.json packaged in GraalVM Reachability Metadata

2 participants