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

Map isless(a,b) to <(a,b) #139

Merged
merged 1 commit into from
Mar 8, 2018
Merged

Conversation

RandomString123
Copy link
Contributor

To fix #138 and ensure no breakage mapping an isless call to less than.

@nalimilan
Copy link
Member

I think you should be able to drop all other comparison operators. Can you try that?

src/WinRPM.jl Outdated
@@ -321,11 +321,7 @@ struct RPMVersionNumber
end
Base.convert(::Type{RPMVersionNumber}, s::AbstractString) = RPMVersionNumber(s)
Base.:(<)(a::RPMVersionNumber, b::RPMVersionNumber) = false
Base.:(==)(a::RPMVersionNumber, b::RPMVersionNumber) = true
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think you can remove this definition. Have you tested it? OTC, is < really needed?

(I must say these constant definitions are really weird...)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did test it on all operations except for install because it is still failing due to a follow-on error. I can put it back for now until I can test end-to-end without any issues.

< will be needed for backwards compatibility since maximum() calls < and not isless in .6

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I also agree they are really weird. I think because there is a lot of repetition in the package list it is just trying to grab the first or last entry which represents the oldest or newest and really isn't doing any number based comparison.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this package is undertested, difficult to test, but heavily depended on, so please minimize the changes you make to it to be as low risk as possible. particularly if you are fixing 0.7-only issues, don't mix concerns and risk breaking 0.6.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree with @tkelman I rolled my changes back to just adding isless to get .7 to work.

@nalimilan
Copy link
Member

@tkelman Merge if that's OK?

@tkelman tkelman merged commit b6a1418 into JuliaPackaging:master Mar 8, 2018
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

Successfully merging this pull request may close these issues.

isless problem on .7 and windows
3 participants