-
Notifications
You must be signed in to change notification settings - Fork 12
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
Doesn't work with UUID v7 #38
Comments
@petemoore what do you think? I think we have historically only supported UUIDv4? @IlyaSemenov what is the use-case for v7? |
v7 uuids are binary/lexicographically sortable, and in particular can be used for fast and reliable cursor pagination. |
Thanks! Looking at the README, this library has been super-clear that a slugid is an encoded v4 Uuid. I suspect changing that to include v7 wouldn't affect most uses of the library, but we'd need to be careful. Maybe this would be a major version bump? I believe the Mozilla folks most responsible for this library have been at a work-week all week, so hopefully we can hear from them next week. |
Absolutely, I didn't mean to present this is a bug — sorry for confusion. But, from end user's point of view, v7 is really no different from v4, it's seemingly the same 128 bits / 32 hex chars string and I suppose slugifying process is agnostic to the nature of these 128 bits. I didn't even realize the version is encoded with the UUID itself. |
Thanks for the suggestion. In worst case, I think, we can just introduce a config option or have separate methods for different uuid versions |
I agree that this library is specifically designed to work with v4 uuids, but that the encode method could be engineered to work with any of the original five versions defined in RFC 4472, or even the extended 8 versions defined in RFC 9562. It is unfortunate (and surprising) if the upstream |
The project doesn't work with UUID v7:
Because it relies on
uuid.parse()
which only works with UUID v1-v5.The text was updated successfully, but these errors were encountered: