-
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Add '<>' operator to Version Parser #808
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
Conversation
|
Isn't that what we have conflicts for? On the other hand this is probably faster than solving conflict rules. |
|
It is synonym for conflicts. But from repository side it is easier to add '<>' constraint to 'require' section, than build 'conflicts' section. |
|
I don't see where you handle such rules in the solver |
|
Do we really want to support |
|
@stof conflict rules are created from package links in the RuleSetGenerator. However this here would only change which packages are returned by whatProvides in the Pool, which should be better performance wise. As for the operator I don't really mind either way. But I guess it'd be cleaner to have just one operator. At the same time someone trying to use <> might be confused why it doesn't work. |
|
@naderman does the pool already support this operator without any change ? |
|
Oh I thought that was in this PR, but it is not, you're right. The code to handle !=/<> would need to be added to |
|
It uses version constraint which supports both operators so I guess it's |
|
If you look at its code, I don't think it correctly does. |
|
Err I meant to say the VersionConstraint class uses version_compare, which handles != and <>. Damn heat :) |
|
Well it doesn't just use version compare, as it compares ranges of versions with each other, so the code needs to be extended to handle != and <> correctly. |
|
Check tests please. I hope I did right assumption about matching behavior. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you can remove the braces. They are not needed
|
Matching behaviour looks correct to me. |
Add '<>' operator to Version Parser
|
Merged, thanks! |
Add '<>' operator to Version Parser
No description provided.