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

Netty's "4.1.60.Final" format not supported #17

Closed
Olical opened this issue Apr 11, 2021 · 4 comments
Closed

Netty's "4.1.60.Final" format not supported #17

Olical opened this issue Apr 11, 2021 · 4 comments

Comments

@Olical
Copy link

Olical commented Apr 11, 2021

Hi there! Thank you for providing such a great tool, I rely on it over in https://github.com/Olical/depot and have only recently updated to the latest version (from 0.x.something!) which I think fixed some of my issues but may have introduced others.

Specifically Olical/depot#52 and Olical/depot#18 (may be something else).

It seems to stem from this 4.1.60.Final format, which doesn't look standard or okay to me. So I was wondering if this format used in the various netty projects (specifically io.netty/netty-transport-native-kqueue) is supposed to be supported? Or if it's just plain broken and you don't think it should work in the first place?

I don't think I have enough domain knowledge on these version string formats to make a judgement call, so I thought I'd see if you had any thoughts before digging deeper?

@xsc
Copy link
Owner

xsc commented Apr 11, 2021

@Olical Thanks for reporting! Generally, those versions seem to be handled perfectly fine:

(require '[version-clj.core :as v])
(v/newer? "4.1.63.Final" "4.1.60.Final") ;; => true

My hypothesis is that "4.1.63.Final" is not even considered as a valid version-to-upgrade-to, i.e. filtered out of the list of available versions at some point.

Looking at depot, I see that version-type returns :qualified here. Since the default for consider-types is #{:release} I could see it removing these versions from the list.

Interestingly, this must mean that previously the .Final suffix was not considered a qualifier (and in my opinion, it should be). I think, to solve your problem, you'll need to explicitly treat "Final" as a release, and version-clj.core/parse might help:

(v/parse "4.1.60.Final")
;; => {:version [(4 1 60) ["final"]], :qualifiers #{"final"}, :snapshot? false, :qualified? true}

Update: It could make sense to have a release? predicate directly in version-clj, and additionally have parse return a :release? key. If you want, you could open a PR in version-clj to add those two things; otherwise, I'll probably do it at some point during the upcoming week. :)

@Olical
Copy link
Author

Olical commented Apr 11, 2021

Oh interesting! Thank you so so much for the insight, I'll take this info and see what I can do with it 😄 just wanted your opinion before I went down a rabbit hole that could've ended with "they just have a completely invalid version syntax".

@Olical
Copy link
Author

Olical commented Apr 11, 2021

If you don't think this is an issue with version-clj in any way (which I don't think it is, mostly just my misunderstanding) then please feel free to close the issue! The advice should be enough for me to fix the issues in my project.

@xsc
Copy link
Owner

xsc commented Apr 11, 2021

@Olical Yeah, I think this is not an issue of version-clj, but with deciding if a given version is a release, based on what version-clj provides. So, I'll close it for now. :)

@xsc xsc closed this as completed Apr 11, 2021
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

2 participants