-
Notifications
You must be signed in to change notification settings - Fork 18
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
Use alphanumeric sorting for VisitOrder#createByName
#36
Conversation
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.
Some tests would be nice, but considering its an exisitng algorithm I trust it works.
Should I make sorting just always use the alphanumeric comparator? Then we wouldn't break the API, and there isn't much reason not to use it anyway, since performance overhead should be negligible |
I don't think including an outside comparator implementation under a different license is a good idea: This sort should be done on the intermediary user side as it is not beneficial to any other case. In addition, the comparator we actuall need is way more simple than this: the implementation would simply be like |
I have my own alphanum sorting impl somewhere.. |
Also adds some missing customization helpers.
@liach My rationale for reopening this (as discussed on Discord):
The licensing concerns are addressed by switching to an Apache-2.0-licensed algorithm instead, we might even switch to Player's solution when he gets the remaining bugs ironed out. |
VisitOrder#createByName
Useful especially for intermediary-like names, so situations like these don't happen:
See the Yarn diff here: FabricMC/yarn@4ec1a6e...NebelNidas:yarn:1.21.1-alphanumeric-sort