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

Improve collision handling on multiple create calls #2325

Merged
merged 4 commits into from
Nov 29, 2024

Conversation

MasterOdin
Copy link
Member

@MasterOdin MasterOdin commented Nov 29, 2024

Closes #2324

PR adds logic for doing collision avoidance when calling the create command multiple times within the same second. Currently, all files would have the same timestamp, and then ordering would be based on the class name. With this PR, each subsequent call to create will increment the timestamp prefix by N seconds until we get a unique timestamp. This is useful for directions that might have a user run multiple create commands to scaffold their app.

This is technically a backwards breaking change if someone relied on multiple calls to create at the same time to be ordered by classname, but I don't think that's likely, and so I'm not going to worry about it much.

@MasterOdin MasterOdin merged commit 184b920 into 0.x Nov 29, 2024
12 checks passed
@MasterOdin MasterOdin deleted the fix-create-timestamp branch November 29, 2024 06:43
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.

Consider collision avoidance on create
1 participant