Treat not-for-native-image metadata as covered#884
Merged
Conversation
Member
|
This should change the specification? |
Member
Author
I would not add this to the docs, as we don't regard the look of the metadata repo |
vjovanov
approved these changes
May 18, 2026
mergify Bot
added a commit
to robfrank/linklift
that referenced
this pull request
Jun 4, 2026
….0 to 1.1.1 [skip ci] Bumps [org.graalvm.buildtools:native-maven-plugin](https://github.com/graalvm/native-build-tools) from 1.1.0 to 1.1.1. Release notes *Sourced from [org.graalvm.buildtools:native-maven-plugin's releases](https://github.com/graalvm/native-build-tools/releases).* > 1.1.1 > ----- > > What's Changed > -------------- > > * Release 1.1.0 by [`@graalvmbot`](https://github.com/graalvmbot) in [graalvm/native-build-tools#880](https://redirect.github.com/graalvm/native-build-tools/pull/880) > * Bump version to 1.1.1-SNAPSHOT by [`@graalvmbot`](https://github.com/graalvmbot) in [graalvm/native-build-tools#881](https://redirect.github.com/graalvm/native-build-tools/pull/881) > * Adapt missing metadata issues to title-only coordinates by [`@jormundur00`](https://github.com/jormundur00) in [graalvm/native-build-tools#886](https://redirect.github.com/graalvm/native-build-tools/pull/886) > * Skip JDK 25 metadata schema check on macOS x64 by [`@jormundur00`](https://github.com/jormundur00) in [graalvm/native-build-tools#888](https://redirect.github.com/graalvm/native-build-tools/pull/888) > * Treat not-for-native-image metadata as covered by [`@jormundur00`](https://github.com/jormundur00) in [graalvm/native-build-tools#884](https://redirect.github.com/graalvm/native-build-tools/pull/884) > * Skip metadata requests for artifacts unavailable in Maven Central repository by [`@jormundur00`](https://github.com/jormundur00) in [graalvm/native-build-tools#890](https://redirect.github.com/graalvm/native-build-tools/pull/890) > * Bump reachability metadata repository to 1.0.2 by [`@jormundur00`](https://github.com/jormundur00) in [graalvm/native-build-tools#897](https://redirect.github.com/graalvm/native-build-tools/pull/897) > * Allow empty classpath for layer-create builds by [`@jormundur00`](https://github.com/jormundur00) in [graalvm/native-build-tools#895](https://redirect.github.com/graalvm/native-build-tools/pull/895) > > **Full Changelog**: <graalvm/native-build-tools@1.1.0...1.1.1> Commits * [`fd47dd5`](graalvm/native-build-tools@fd47dd5) Release 1.1.1 * [`0d6e84e`](graalvm/native-build-tools@0d6e84e) Allow empty classpath for layer-create builds ([#895](https://redirect.github.com/graalvm/native-build-tools/issues/895)) * [`56a974c`](graalvm/native-build-tools@56a974c) Bump reachability metadata repository to 1.0.2 ([#897](https://redirect.github.com/graalvm/native-build-tools/issues/897)) * [`5c091d7`](graalvm/native-build-tools@5c091d7) Skip metadata requests for artifacts unavailable in Maven Central repository ... * [`e91cd32`](graalvm/native-build-tools@e91cd32) Treat not-for-native-image metadata as covered ([#884](https://redirect.github.com/graalvm/native-build-tools/issues/884)) * [`97565e2`](graalvm/native-build-tools@97565e2) Skip JDK 25 metadata schema check on macOS x64 ([#888](https://redirect.github.com/graalvm/native-build-tools/issues/888)) * [`6bffd62`](graalvm/native-build-tools@6bffd62) Adapt missing metadata issues to title-only coordinates ([#886](https://redirect.github.com/graalvm/native-build-tools/issues/886)) * [`83ec10d`](graalvm/native-build-tools@83ec10d) Merge pull request [#881](https://redirect.github.com/graalvm/native-build-tools/issues/881) from graalvm/bump-version-to-1.1.1-SNAPSHOT * [`a0dee9e`](graalvm/native-build-tools@a0dee9e) Bump version to 1.1.1-SNAPSHOT * [`7852e4c`](graalvm/native-build-tools@7852e4c) Merge pull request [#880](https://redirect.github.com/graalvm/native-build-tools/issues/880) from graalvm/release/1.1.0 * See full diff in [compare view](graalvm/native-build-tools@1.1.0...1.1.1) [](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- Dependabot commands and options You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
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.
Summary
Closes #883.
This change teaches
list-libraries-missing-metadatato treat reachability metadata repository entries marked with"not-for-native-image": trueas covered, even though those entries intentionally do not provide metadata configuration files to copy.The motivating case is artifacts such as Netty's
io.netty:netty-transport-native-io_uring. The repository can contain anindex.jsonentry explaining that the artifact is not itself a native-image metadata target and, optionally, pointing users/tools to the replacement artifact that carries the JVM classes.New acceptable index.json shape
Normal metadata entries still use the existing shape with
metadata-versionand version matching fields:[ { "tested-versions": ["3.1.2"], "metadata-version": "3.1.2", "latest": true } ]Those entries resolve to an actual metadata directory and continue to return
DirectoryConfigurationinstances as before.This PR adds support for a special marker-only entry:
[ { "not-for-native-image": true, "reason": "The main JAR contains only module metadata, and platform classifier JARs carry native libraries; the JVM io_uring transport classes are published separately.", "replacement": "io.netty:netty-transport-classes-io_uring:4.2.1.Final" } ]Supported fields for this special shape:
not-for-native-image: required boolean marker. Whentrue, the repository is explicitly saying this artifact should not have native-image metadata files.reason: optional human-readable explanation.replacement: optional Maven coordinates for a replacement or related artifact that should be considered instead.The marker can also be scoped with existing index matching fields:
[ { "not-for-native-image": true, "tested-versions": ["4.2.1.Final"], "reason": "Only this version is known to be a marker artifact.", "replacement": "io.netty:netty-transport-classes-io_uring:4.2.1.Final" } ][ { "not-for-native-image": true, "default-for": "4\\.2\\..*", "reason": "All 4.2.x native transport marker artifacts are covered by the replacement classes artifact." } ][ { "not-for-native-image": true, "latest": true, "reason": "Use this as the latest known marker entry when the requested version is untested." } ]If no version matching field is present, the marker applies generally to that artifact.
Why this change is needed
Before this PR,
MissingMetadataCommandSupporttreated a dependency as supported only when:returned a non-empty set.
That conflates two different cases:
For case 2, returning a fake
DirectoryConfigurationwould be the wrong abstraction because metadata copy and native-image configuration paths should not copy anything. There are no config files for marker-only entries.This PR separates the two questions:
findConfigurationsFor(...): returns real metadata directories to copy, unchanged.isCoveredByRepository(...): answers whether the repository covers the artifact for reporting purposes.The default
isCoveredByRepository(...)implementation preserves existing behavior by checking whetherfindConfigurationsFor(...)is non-empty.FileSystemRepositoryoverrides it to also recognizenot-for-native-imageentries.Implementation details
GraalVMReachabilityMetadataRepository.isCoveredByRepository(...)with default behavior based onfindConfigurationsFor(...).MissingMetadataCommandSupportto callisCoveredByRepository(...)when deciding whether to report a dependency as supported or missing.not-for-native-imagein the artifact index model.VersionToConfigDirectoryIndex.isNotForNativeImage(...)so the filesystem repository can identify marker-only coverage.FileSystemRepository.isCoveredByRepository(...)so it checks normal metadata matches first, then falls back to marker-only coverage.Important behavior preserved:
findConfigurationsFor(...)still returns no configuration fornot-for-native-imagemarker entries. This means metadata-copy/native-image configuration materialization remains unchanged.Testing
Ran the focused shared metadata tests and Gradle plugin compile check with JDK 17:
The test run passed and covered:
not-for-native-imageindex entries;findConfigurationsFor(...)still returns no config directories for marker-only entries;MissingMetadataCommandSupportreports marker-only entries assupported;isCoveredByRepository(...).Note: the currently active Java 25 runtime fails during Gradle/Kotlin DSL initialization in this checkout, so the verification command was run with the installed JDK 17.