Skip to content

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
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

1 participant