Skip to content

Conversation

@jormundur00
Copy link
Member

@jormundur00 jormundur00 commented Nov 24, 2025

What does this PR do?

In this PR we introduce a script for easy checking if a library is supported by the GraalVM Reachability Metadata repository. We do this by parsing the index.json file for the particular library (if it exists) and looking for the requested version under tested-versions. If it exists, the library is supported.

To use the script, position yourself in the root of the repository and call: ./check-library-support.sh <groupId:artifactId:version> (e.g.: org.hibernate.orm:hibernate-core:7.0.0.Final).

Fixes: #808.

P.S: We should wait for the merge of #802 before merging this PR, as we should add the usage of the script to the README.md.

@jormundur00 jormundur00 self-assigned this Nov 24, 2025
@jormundur00 jormundur00 added the enhancement New feature or request label Nov 24, 2025
fi

# Check if the version exists in any tested-versions (exact match)
MATCH=$(jq --arg ver "$VERSION" 'any(.[]["tested-versions"][]?; . == $ver)' "$INDEX_FILE")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would go without jq. We need to add a section in the README.md that allows a copy-paste script similar to install scripts such as curl -s "https://get.sdkman.io" | bash.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I replaced the usage of jq with awk and migrated the script to be usable with curl, so it can now be used without cloning the repository. The copy-paste command can now be found in the README.md too.

README.md Outdated
If you’d like yours to appear there as well, open a pull request updating [this JSON file](https://github.com/oracle/graalvm-reachability-metadata/blob/master/library-and-framework-list.json).
Before submitting a pull request, please read [this guide](docs/CONTRIBUTING.md#tested-libraries-and-frameworks).

You can also check if metadata for a library exists on the repository directly from your terminal without cloning it using:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Put this first. Do we have tickets for running with preserve and detecting libraries that don't require metadata?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done, the command is referenced first in the README now. I've also opened the ticket.


set -euo pipefail

if [ "$#" -ne 1 ]; then
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On which OS-es does this script work?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe mention that in the readme.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The script should have native support on Linux and macOS, while Windows can run it through channels such as WSL or Windows Git Bash. I've added a line in the README explaining this.

set -euo pipefail

if [ "$#" -ne 1 ]; then
echo "Usage: $0 <groupId>:<artifactId>:<version>"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If the library is not parsing properly we need to display nice errors.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've added an additional check if the argument provided to the command is in the GAV format (displaying an error if wrong format is used).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature: We need a simple copy-paste script that allows to check if a maven artifact is supported

2 participants