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

Older version listed as update #121

Closed
gabrielittner opened this issue Oct 22, 2016 · 4 comments
Closed

Older version listed as update #121

gabrielittner opened this issue Oct 22, 2016 · 4 comments

Comments

@gabrielittner
Copy link
Contributor

When the version of a dependency ends with -update1 the version without that suffix is listed as update for that.

An example for that is (it already has a 1.3 release by now, so you have to ignore that version)
https://repo1.maven.org/maven2/com/jakewharton/auto/value/auto-value-annotations . When you depend on 1.2-update1 the plugin will suggest to update to 1.2.
Before the 1.3 release the metadata looked like this:

<metadata>
  <groupId>com.jakewharton.auto.value</groupId>
  <artifactId>auto-value-annotations</artifactId>
  <versioning>
    <latest>1.2-update1</latest>
    <release>1.2-update1</release>
    <versions>
      <version>1.2</version>
      <version>1.2-update1</version>
    </versions>
    <lastUpdated>20160830215216</lastUpdated>
  </versioning>
</metadata>
@ben-manes
Copy link
Owner

I think this is a limitation of Maven's version comparison rules and Gradle's implementation of that. The comparator is probably expecting cases like -beta to ignore. Per #73 on the forum, Gradle has some suffixes that it special cases (like RC). I don't know why latest isn't an override, though. Its too bad semver wasn't used since those rules don't trigger as many quirks.

You could bring this up on the Gradle Forum and see what the devs say. Since we're delegating to their resolution rules its a limitation in the dependency management.

@jochenberger
Copy link
Collaborator

I think that the behavior is correct. "1.2-update1" is probably treated as a pre-release version according to the SemVer spec (http://semver.org/spec/v1.0.0.html) item 4.

@huxi
Copy link

huxi commented Feb 8, 2017

For what it's worth: The Java version scheme, both <=1.8 and >=9, are handling -suffix as "less than without suffix", too.

@ben-manes
Copy link
Owner

Closing as it sounds like we're doing the right thing. If not, then please open a Gradle issue as we are using their comparator. You could test in Maven to see how it behaves to verify.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants