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

Fix lexicographic ordering when timestamps are the same #17

Merged
merged 1 commit into from
Feb 3, 2025

Conversation

TheInnerLight
Copy link
Contributor

ULIDs are currently not lexicographically sortable unless they have the same timestamp.

This is also has alarming consequences where members Sets of ULID will be treated as equal if the timestamps are the same but have different random components.

This change ensures that they will be sorted correctly even if the timestamps are identical.

See also: #15

@ad-si
Copy link
Member

ad-si commented Oct 24, 2024

Great addition, thanks! However, can you maybe also add a section to the readme explaining the issue including a warning that ULIDs are sorted based on the random part, even though this is not necessarily the order they were created in?

@ad-si
Copy link
Member

ad-si commented Feb 3, 2025

Added section already to readme.

@ad-si ad-si merged commit 3030780 into haskell-github-trust:master Feb 3, 2025
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.

2 participants