You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Just recording a few quirks / opportunities in MavenDependency's findNewerVersions method:
Overall, this method checks Maven metadata first and then compares version numbers after; it could probably save some HTTP traffic if it first checked whether the VersionComparator is even able to yield a "newer version" compared to the currentVersion and early-exited if not
Imagine a new canUpgrade(String currentVersion) method on VersionComparator which would (eg) return false if the current version is 3.0.0 and the version comparator is based on 2.1.x
Just recording a few quirks / opportunities in
MavenDependency
'sfindNewerVersions
method:VersionComparator
is even able to yield a "newer version" compared to thecurrentVersion
and early-exited if notcanUpgrade(String currentVersion)
method onVersionComparator
which would (eg) returnfalse
if the current version is3.0.0
and the version comparator is based on2.1.x
ExactVersion
edge case which handles incomplete Maven metadata: I think this line is an obscure error, and it should be comparing if the exact version is an upgrade of the current version instead of returning it unconditionally: https://github.com/openrewrite/rewrite/blame/05795eb525099812887796b5d0a73eda6d7f6673/rewrite-maven/src/main/java/org/openrewrite/maven/trait/MavenDependency.java#L103The text was updated successfully, but these errors were encountered: