-
Notifications
You must be signed in to change notification settings - Fork 68
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
Add support for default-for
attribute
#432
Conversation
This new index.json attribute is design to allow more flexible version matching to avoid breakage due to switch on latest version for untested ones. It should have a `default-for` key and a regexp as a string value, for example "1\\.0\\..*" which should match versions like "1.0.0", "1.0.1", "1.0.2", etc. See oracle/graalvm-reachability-metadata#62 See oracle/graalvm-reachability-metadata#275
...lvm/reachability/internal/index/artifacts/SingleModuleJsonVersionToConfigDirectoryIndex.java
Outdated
Show resolved
Hide resolved
...lvm/reachability/internal/index/artifacts/SingleModuleJsonVersionToConfigDirectoryIndex.java
Outdated
Show resolved
Hide resolved
Perform 2 distinct findConfigurationFor invocations in order to not be dependent of the order.
@aclement Could you please give your +1 for merging this PR? |
looks good to me. |
* | ||
* @param groupId the group ID of the artifact | ||
* @param artifactId the artifact ID of the artifact | ||
* @param version the version of the artifact | ||
* @return a configuration directory, or empty if no configuration directory is available | ||
*/ | ||
@Override | ||
public Optional<DirectoryConfiguration> findLatestConfigurationFor(String groupId, String artifactId, String version) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The name is no longer accurate. Not sure if we want to change it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you please elaborate?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
findLatestConfigurationFor, shouldn't it be something like findMatchingConfigurationFor now?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks for the PR!
Don't forget release notes :) |
This new
index.json
attribute is design to allow more flexible version matching to avoid breakage due to switch on latest version for untested ones.It should have a
default-for
key and a regexp as a string value, for example "1\.0\..*" which should match versions like "1.0.0", "1.0.1", "1.0.2", etc.Please do not merge before @aclement has given his +1.
See oracle/graalvm-reachability-metadata#62
See oracle/graalvm-reachability-metadata#275