bufbuild / protovalidate-go

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

[BUG] undefined: atomic.Pointer v0.3.3 #61

Closed kailashyogeshwar85 closed 1 year ago

kailashyogeshwar85 commented 1 year ago

Description

Steps to Reproduce

  1. go get github.com/bufbuild/protovalidate-go@v0.3.3
  2. kratos run

GO_PATH/pkg/mod/github.com/bufbuild/protovalidate-go@v0.3.3/internal/evaluator/builder.go:34:21: undefined: atomic.Pointer

Expected Behavior

Actual Behavior

Program terminates

Screenshots/Logs

Environment

Possible Solution

Additional Context

Works when download protovalidate-go to v0.2.0

nicksnyder commented 1 year ago

Thanks for the bug report. It looks like in https://github.com/bufbuild/protovalidate-go/pull/31 we introduced a dependency on atomic.Pointer, which requires Go 1.19, but we forgot to update the minimum required version in go.mod. We will get this fixed.

I assume that you are using Go 1.18 or earlier? If so, the solution is to either upgrade Go to 1.19 or later or downgrade protovalidate to v0.3.1 or earlier.