-
-
Notifications
You must be signed in to change notification settings - Fork 2
feat: add support for UUIDv7 generation and update command options to use UUIDv7 #22
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
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
💡 Verification agent
🧩 Analysis chain
Prevent runtime breakages with custom providers: add
uuid7/0fallback (or update docs and enforce).Today
uuid7/0is a direct delegate; if a custom provider lacksuuid7/0, calls from the router/in-memory adapter will crash. Suggest a backward-compatible fallback touuid4/0whenuuid7/0isn’t exported.Apply this change:
Additionally, the moduledoc still states “Your custom module must provide a
uuid4/0function.” Please update it to reflectuuid7/0usage or the fallback, e.g.:Note: The default provider
Uniq.UUIDalready supportsuuid7/0. (github.com)If you prefer strictness over fallback, we can instead keep the delegate and raise early with a clear error if
uuid7/0is missing. Want a patch for that path instead?🏁 Script executed:
Length of output: 1887
Prevent runtime breakages with custom providers: add
uuid7/0fallback (or update docs and enforce).defdelegate uuid7/0 currently delegates directly; if a configured provider doesn't export
uuid7/0, callers will crash at runtime (seen in lib/commanded/event/mapper.ex, lib/commanded/commands/router.ex, lib/commanded/event_store/adapters/in_memory.ex). Replace the delegate with a safe fallback and update docs.Apply this change to lib/commanded/uuid.ex:
Also update the moduledoc and guides (lib/commanded/uuid.ex @moduledoc and guides/explanations/commands.md) to reflect the fallback, e.g.:
If you prefer strictness instead of a fallback, keep the delegate and raise early with a clear error — I can provide that patch.