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

Produce compile-time error on (required) set on an Empty field #146

Open
alexander-yevsyukov opened this issue Nov 5, 2024 · 0 comments
Assignees

Comments

@alexander-yevsyukov
Copy link
Collaborator

alexander-yevsyukov commented Nov 5, 2024

Such an option set on a field with the type google.protobuf.Empty should not compile because enclosing message could not be built using the generated validation code.

When checking for a filled in value, we compare the value with a default instance of a message, and the result would be always true.

This also should include implicitly required field such as IDs for command messages or entity states.

@alexander-yevsyukov alexander-yevsyukov changed the title Produce compile-time error on (required) set on a field with type google.protobuf.Empty Produce compile-time error on (required) set on google.protobuf.Empty field Nov 5, 2024
@alexander-yevsyukov alexander-yevsyukov changed the title Produce compile-time error on (required) set on google.protobuf.Empty field Produce compile-time error on (required) set on an Empty field Nov 5, 2024
@alexander-yevsyukov alexander-yevsyukov self-assigned this Dec 9, 2024
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

No branches or pull requests

1 participant