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

Not able handle suffixed version #55

Closed
wolandmaster opened this issue Nov 7, 2019 · 4 comments
Closed

Not able handle suffixed version #55

wolandmaster opened this issue Nov 7, 2019 · 4 comments

Comments

@wolandmaster
Copy link

The below example should return with true, but it doesn't.

final Version version = Version.valueOf("1.2.3-45");
final Expression expression = ExpressionParser.newInstance().parse("1.2.3-45");
System.out.println("satisfies: " + version.satisfies(expression));

Due to this problem, the microbean kubernetes helm library is not able to install helm charts that contain dependency charts.

@asarkar
Copy link

asarkar commented Nov 9, 2020

I don't think this library is maintained any more. You may want to check out https://github.com/asarkar/jsemver.

@zafarkhaja
Copy link
Owner

Hello Sandor! Sorry it took me this long to get back to you.

Most likely it's not relevant to you anymore, but I'm going to respond for future reference anyway :)

The situation is two-fold:

  1. Because expressions grammar doesn't support pre-release versions, the expression on line 2 is translated to >=1.2.3 & <45.0.0, which is obviously not the same as version 1.2.3-45 from line 1.

  2. And because pre-release versions have lower precedence than the associated normal version, the version 1.2.3-45 doesn't satisfy >=1.2.3.

@zafarkhaja
Copy link
Owner

Duplicate of #54.

@zafarkhaja
Copy link
Owner

Closing this issue in favor of #70, the progress can be followed from there.

@zafarkhaja zafarkhaja closed this as not planned Won't fix, can't repro, duplicate, stale Jan 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants