[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Transitioning golang-goprotobuf to unstable?



Hi,

On 30.01.22 20:54, Nilesh Patra wrote:
I am aware the protobuf and friends golang packages (golang-goprotobuf, golang-gogoprotobuf et. al.)
have drastic changes with even minor versions, and it is not very straightforward to migrate these,
and hence I am unsure of what might be the best way to accomplish this.

This has just become an issue for golang-github-prometheus-client-golang also. Version 1.12.0 and later requires golang-google-protobuf in addition to its previous build-dep on golang-goprotobuf. We can satisfy the golang-google-protobuf requirement, and in the past it was happy to build against golang-goprotobuf 1.3.x, but client_golang 1.12.x fails to build:

# github.com/prometheus/client_golang/prometheus
src/github.com/prometheus/client_golang/prometheus/value.go:190:14: cannot use tsProto (type *timestamppb.Timestamp) as type *timestamp.Timestamp in assignment

In golang-goprotobuf 1.3.x, timestamp.Timestamp was declared as a struct type within that package. After 1.4.x however, it's a type alias for timestamppb.Timestamp from the golang-google-protobuf package. The struct definitions are similar, but the original timestamp.Timestamp has additional members, so a simple typecast is out of the question.

Attachment: OpenPGP_0xB700173FBB805A29.asc
Description: OpenPGP public key

Attachment: OpenPGP_signature
Description: OpenPGP digital signature


Reply to: