Skip to content

Conversation

@fingolfin
Copy link
Member

Use isless instead of lexless. Fixes #29583

Use isless instead of lexless. Fixes JuliaLang#29583
@KristofferC
Copy link
Member

Is this used anywhere? Can it be deleted?

@StefanKarpinski
Copy link
Member

I'm not sure if we currently use it, but if you want to print a sorted list of SHA1 values, it's handy.

@KristofferC
Copy link
Member

Sure but you can always just string.(...) it. It seems non-clear how to define this so letting someone be explicit seems better.

@StefanKarpinski
Copy link
Member

What order would you possibly want to sort SHA-1 hash values in?

@KristofferC
Copy link
Member

I don't see any reason to start adding arbitrary methods and tests to internal structs. A vector of SHA1 is never formed in Base so there is no way you would end up with one. It is just dead code floating around, should be deleted.

@staticfloat
Copy link
Member

I agree it's obvious which way hashes should be sorted, but I also agree we should just remove the method. We can add it back easily enough next time we want to sort hashes, for now it's just wasting space and compilation time.

@fingolfin
Copy link
Member Author

Just to clarify, this not adding any methods, just fixing an existing one. As to the test: I merely added the test because where I come from, it's good policy to add tests for all code you add or touch. I don't mind dropping it either, though shrug

Also, I use none of this code, so if you rather drop that isless method, that's perfectly fine by me as well :-).

@StefanKarpinski
Copy link
Member

The SHA1 type is not public, so it doesn't matter whether it has this method or not. It is, however, better to have a correct method than a broken one. Until we refactor this code to use a real SHA1 type, this is an improvement.

@StefanKarpinski StefanKarpinski merged commit 8fe1d24 into JuliaLang:master Oct 19, 2018
@fingolfin fingolfin deleted the mh/no-lexless branch November 30, 2018 09:46
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.

4 participants