-
Notifications
You must be signed in to change notification settings - Fork 316
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
Switch to the Semver4j fork #6154
Conversation
ee57875
to
404ac51
Compare
96a4f67
to
ca6f534
Compare
be394c2
to
f86ceb9
Compare
0f61618
to
cff197b
Compare
The new semver4j GitHub organization contains a maintained fork / copy [1] of the original semver4j library by @vdurmont [2]. However, the API changed quite significantly. Catch up with those changes in order to (partly) fix issue #6153. [1]: https://github.com/semver4j/semver4j [2]: https://github.com/vdurmont/semver4j Signed-off-by: Sebastian Schuberth <[email protected]>
cff197b
to
7a9d800
Compare
it == CommandLineTool.ANY_VERSION || it.isSatisfiedBy(actualVersion) | ||
Semver.coerce(actualVersion).satisfies(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.
Why is the check for ANY_VERSION
dropped?
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.
ANY_VERSION
was introduced here in d8c65c3 to work around a limitation of the original isSatisfiedBy()
call which does not handle non-semantic versions, but even those should be accepted here. This is not necessary anymore with the new code as it uses coerce()
before.
// '1.0' does not satisfy the version range [1.0,2.0], see | ||
// https://github.com/vdurmont/semver4j/issues/67. | ||
Requirement.buildIvy(id.version).isSatisfiedBy(Semver(pkgId.version, Semver.SemverType.LOOSE)) | ||
Semver.coerce(pkgId.version).satisfies(id.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.
satisfies(String)
never uses coerce
internally.
Isn't this required to solve the TODO
above?
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.
It shouldn't be necessary (anymore), see semver4j/semver4j#100. And I just manually verified that Semver.coerce("1.0").satisfies("[1.0,2.0]") == true
.
Please have a look at the individual commit messages for the details.