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 validation errors #154

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

jchadwick-buf
Copy link
Member

@jchadwick-buf jchadwick-buf commented Oct 15, 2024

This contains two main changes:

A lot of different approaches were considered, but so far this seems to be the cleanest way to get the desired result. It also has the benefit of removing most of the unnecessary allocations that were added in the error case during the proto2 migration.

I think there is no particularly good reason to keep the Violation message as part of the protovalidate protobuf API, so I think it should be moved to the validation test harness. After further discussion, I think we're not in a position to remove Violation or Violations from the API right now, due to usages outside of protovalidate (e.g. as error details, in connectrpc/validate-go.). We'll need to weigh in on this before 1.0.

Copy link

The latest Buf updates on your PR. Results from workflow Buf / validate-protos (pull_request).

BuildFormatLintBreakingUpdated (UTC)
✅ passed✅ passed✅ passed✅ passedOct 15, 2024, 9:35 PM

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.

Un-typedef errors.ValidationError to buf.validate.Violations
1 participant