Skip to content
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

Merged
merged 2 commits into from
May 3, 2023
Merged

Conversation

sdeleuze
Copy link
Collaborator

@sdeleuze sdeleuze commented Apr 28, 2023

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

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
@sdeleuze sdeleuze added this to the 0.9.22 milestone Apr 28, 2023
@sdeleuze sdeleuze requested a review from melix April 28, 2023 16:43
@oracle-contributor-agreement oracle-contributor-agreement bot added the OCA Verified All contributors have signed the Oracle Contributor Agreement. label Apr 28, 2023
@sdeleuze sdeleuze requested a review from dnestoro April 28, 2023 16:44
Perform 2 distinct findConfigurationFor invocations
in order to not be dependent of the order.
@sdeleuze
Copy link
Collaborator Author

sdeleuze commented May 2, 2023

@aclement Could you please give your +1 for merging this PR?

@aclement
Copy link
Collaborator

aclement commented May 2, 2023

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) {
Copy link
Member

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?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Could you please elaborate?

Copy link
Member

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?

Copy link
Member

@fniephaus fniephaus left a 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!

@dnestoro dnestoro merged commit e16450b into graalvm:master May 3, 2023
10 checks passed
@melix
Copy link
Collaborator

melix commented May 3, 2023

Don't forget release notes :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
OCA Verified All contributors have signed the Oracle Contributor Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants