bufbuild / protovalidate-go

Protocol Buffer Validation for Go
https://pkg.go.dev/github.com/bufbuild/protovalidate-go
Apache License 2.0
294 stars 19 forks source link

Seeing a panic when using predefined rules #148

Closed doriable closed 2 months ago

doriable commented 2 months ago

Description

When setting a value for a field with predefined rules, we get a panic:

$ go run main.go
panic: interface conversion: *types.Err is not traits.Lister: missing method Add

Steps to Reproduce

This is an example repository with a repro: https://github.com/doriable/pv-go-bug

Basically this just creates a message and attempts to set the value. Included is also a message that does not use predefined rules to compare the behaviour.

Expected Behavior

We should be able to set the value safely and run validation.

Actual Behavior

We are seeing a panic instead.

Environment