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

[question] which is bigger according the constraint? #92

Open
samisalamiws opened this issue May 2, 2022 · 1 comment
Open

[question] which is bigger according the constraint? #92

samisalamiws opened this issue May 2, 2022 · 1 comment

Comments

@samisalamiws
Copy link

I have a range of the versions and a version that I need to check if it is inside the range.
the constraint that I build was:

element 0: >=3.6.6
element 1: <3.6.8-15.1

(see screenshot for clearer vision)
image

The version that I'm checking is 3.6.8
The check is returning false on the "less than" element (<3.6.8-15.1)

Why does 3.6.8-15.1 considered not bigger than 3.6.8?

@xuyixin1996
Copy link

+1, this constraint behaviour looks weird for me as well when I use it for comparing the linux kernel version.

go playground

The expected result should be true for me (5.15.0-7 should large than 5.4.0-77), but it seems that this is on purposed from the previous MR #35
can check this test case

But the current behaviour is quite confusing, the return value "false" does not stand for the version does not meet the constraint. Instead, it indicates "A constraint with a pre-release can only match a pre-release version with the same base segments." from this comment

Thus, the return value for the Check method is ambiguous.

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