sbt-updates icon indicating copy to clipboard operation
sbt-updates copied to clipboard

Version X is considered newer than Y incorrectly

Open meloniasty opened this issue 11 years ago • 9 comments

Hi,

in my dependencies i'm using bonecp in version 0.8.0.RELEASE

 val boneCp = "com.jolbox" % "bonecp" % "0.8.0.RELEASE"

also im using sbt-updates 0.1.3 with sbt 0.13.1

when call dependencyUpdates i'm getting:

[info]   com.jolbox:bonecp                     : 0.8.0.RELEASE -> 0.8.0-rc3

but version 0.8.0-rc3 is older than 0.8.0.RELEASE

(http://mvnrepository.com/artifact/com.jolbox/bonecp, https://github.com/wwadge/bonecp/releases)

it's correct behavior?

meloniasty avatar Feb 17 '14 08:02 meloniasty

It is quite difficult to say if one version is older or newer than another just from the version text. I will investigate if maven metadata order gives better results.

rtimush avatar Feb 19 '14 07:02 rtimush

ok, it's not so important but better fix someday

maybe there is timestamp or date field to check

meloniasty avatar Feb 19 '14 07:02 meloniasty

One more example from #30:

[info] org.apache.poi:poi : 3.10-FINAL -> 3.10-beta2
[info] org.apache.poi:poi-ooxml : 3.10-FINAL -> 3.10-beta2

rtimush avatar Jul 23 '14 09:07 rtimush

Could you just lop /(?i)[-.](?:final|release)$/ off of the version string or something? (If this is a stupid suggestion I apologize; I haven't looked at how your plugin works internally).

lespea avatar Aug 07 '14 23:08 lespea

One more from #22:

nl.grons:metrics-scala:compile : 3.0.5_a2.3 -> 3.0.4

rtimush avatar Aug 28 '14 05:08 rtimush

And from #33

[info]   org.webjars:requirejs    : 2.1.14-1      -> 2.1.14
[info]   org.webjars:underscorejs : 1.6.0-3       -> 1.6.0

rtimush avatar Aug 28 '14 05:08 rtimush

From #31:

[info]   asm:asm                       : 3.3.1            -> 20070324       
[info]   asm:asm-util                  : 3.3.1            -> 20041228.180559

rtimush avatar Aug 28 '14 05:08 rtimush

Another case (should this be another ticket?):

[info]   org.webjars:webjars-play        : 2.4.0-1 -> 2.4.0  -> 2.5.0           

It thinks that 2.4.0-1 is older than 2.4.0, when in reality it's a hotfix version.

nafg avatar May 25 '16 22:05 nafg

Just wanted to add - I think you can specify something like latest.release (see http://ant.apache.org/ivy/history/2.5.0-rc1/ivyfile/dependency.html ). In general probably a bad practice to blindly use the latest version but just throwing it out there.

steven-lai avatar Mar 05 '19 02:03 steven-lai