Closed simon04 closed 6 years ago
@simon04 Thanks for the PR.
I think this is actually exposing a problem in the version API which I think should be fixed by changing the API to take a CompleteVersion
for the Older
/ Newer
/ Equal
methods, rather than exposing the lower level compare API which was intended for internal implementation.
What do you think about that?
This is fine for me as well. However, it breaks backward compatibility of the API …
On Sun, 13 May 2018, 08:51 Mikkel Oscar Lyderik Larsen, < notifications@github.com> wrote:
@simon04 https://github.com/simon04 Thanks for the PR.
I think this is actually exposing a problem in the version API which I think should be fixed by changing the API to take a CompleteVersion for the Older / Newer / Equal methods, rather than exposing the lower level compare API which was intended for internal implementation.
What do you think about that?
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/mikkeloscar/gopkgbuild/pull/21#issuecomment-388605632, or mute the thread https://github.com/notifications/unsubscribe-auth/AAvwbl0a3huEvfkqTHwL8T01iOmooFl1ks5tx9fwgaJpZM4T3V7j .
@Morganamilo I think you are one of the biggest consumers of this library, what do you say about breaking the API as discussed here? Would it be a big problem for you?
I don't mind, we mostly just parse srcinfos anyway so little would be effected. There's only one call to .Newer in our codbase as far as I can tell. And even if there were more I don't mind changing stuff.
Replaced by #23
The drawback of
CompleteVersion.Older
/Newer
/Equal
is that it needs to parse the other version (given asstring
) and returnsfalse
if it fails to parse. Thus, afterwards one cannot why one of those tests failed.This PR allows to
Compare
two previously parsedCompleteVersion
s with each other.