-
Notifications
You must be signed in to change notification settings - Fork 111
Rewrite Groovy into Java #882
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
base: master
Are you sure you want to change the base?
Conversation
…eserve task behavior
…preserve task behavior
…eserve task behavior
…preserve task behavior
…; preserve task behavior
…serve task behavior
… Java; preserve task behavior
…preserve task behavior
…to Java; preserve task behavior
…from Groovy to Java; preserve task behavior
…erve task behavior
…onventional layout and metadata-version; tolerate missing tests index.json in TestInvocationTask
bd9ecbd to
7423c62
Compare
jormundur00
left a comment
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.
Changes look generally good to me (except for the version pattern that needs to be changed).
I see that all these files are still in the groovy sub-directory, which I assume is because the Utils and gradle files are still in written in Groovy. Are there plans to change them to Java too (either in this PR, or a follow-up), so we don't have a misleading groovy directory?
| // Fall through to conventional layout resolution below. | ||
| } | ||
| // Fallback: conventional layout tests/src/<group>/<artifact>/<version> | ||
| Path conventional = testRoot().resolve(groupId).resolve(artifactId).resolve(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.
So previously we only matched using tests/src/index.json, and failed otherwise? These fallbacks will be useful once we get rid of that index.json.
| * Pre-release identifiers (case-insensitive): alpha, beta, rc, cr, m<num>, ea, b<num>, preview, and pure numeric suffixes. | ||
| * Versions ending with ".Final" are treated as full releases of the base version. | ||
| */ | ||
| private static final Pattern VERSION_PATTERN = Pattern.compile("(?i)^(\\\\d+(?:\\\\.\\\\d+)*)" |
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.
This pattern is not correct. Please take a look at org.graalvm.internal.tck.TestedVersionUpdaterTask#VERSION_PATTERN for the Java equivalent of this Groovy pattern, and either copy it, or even better, reuse it (reference the other from whichever class is best).
Fixes: #774