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

refactor: embed UUIDMixin into ProtoMessageMixin, auto-generate UUID fields #58

Merged
merged 1 commit into from
Jan 16, 2025

Conversation

jhoward-lm
Copy link
Contributor

@jhoward-lm jhoward-lm commented Jan 13, 2025

This PR embeds the schema UUIDMixin into ProtoMessageMixin. It also implements UUID generation as a schema hook that runs automatically without needing to call SetID() explicitly.

This PR lays the groundwork for a future schema hook that will be implemented for the proto_message field.

Diff against previous branch in the PR series: link

Depends on #57

Note

Only the following files are manually modified; the rest are auto-generated

  • backends/ent/*.go
  • internal/backends/ent/schema/*.go

/cc @ashearin @lmphil @pkwiatkowski1 @Strakeln @jmayer-lm @EphraimEM

@jhoward-lm jhoward-lm added enhancement New feature or request go Pull requests that update Go code labels Jan 13, 2025
@jhoward-lm jhoward-lm self-assigned this Jan 13, 2025
@@ -8,7 +8,7 @@ require (
github.com/google/uuid v1.6.0
github.com/protobom/protobom v0.5.0
github.com/stretchr/testify v1.10.0
google.golang.org/protobuf v1.36.2
google.golang.org/protobuf v1.36.1
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this downgrade expected?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, good catch! I'll fix it

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll roll it into the next PR

Copy link
Member

@puerco puerco left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, for some reason the PR is downgrading the protobuf module, we can merge this and fix it in the next one if that's easier.

@jhoward-lm jhoward-lm merged commit 5ce1b78 into protobom:main Jan 16, 2025
2 checks passed
@jhoward-lm jhoward-lm deleted the embed-uuid-mixin branch January 16, 2025 18:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request go Pull requests that update Go code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants