You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Protobufs are used a lot, unfortunately sometimes in different versions. What happens if a Go program imports github.com/golang/protobuf/proto but also uses client_golang for instrumentation, which might depend on a different version of github.com/golang/protobuf/proto? Even if this kind of conflict might be rare, some users are put off by the mere possibility.
We have already tried to vendor prometheus/client_model completely within prometheus/client_golang via import rewriting. That failed badly because any code using prometheus/client_model directly
suddenly considered the types exported by prometheus/client_model different from those used in prometheus/client_golang. We could, however, vendor github.com/golang/protobuf/proto via import rewriting within prometheus/client_model. All the Prometheus protomessages would be incompatible with other protomessages, but that should not be an issue. It would bloat the resulting code somewhat, though. github.com/golang/protobuf/proto has ~10k LOC.
Pros and cons have to be weighed carefully. Also, solutions for dependency management as they are established within the Go community should be taken into account to not pick contradicting approaches.
Protobufs are used a lot, unfortunately sometimes in different versions. What happens if a Go program imports
github.com/golang/protobuf/proto
but also usesclient_golang
for instrumentation, which might depend on a different version ofgh.neting.cc/golang/protobuf/proto
? Even if this kind of conflict might be rare, some users are put off by the mere possibility.We have already tried to vendor
prometheus/client_model
completely withinprometheus/client_golang
via import rewriting. That failed badly because any code usingprometheus/client_model
directlysuddenly considered the types exported by
prometheus/client_model
different from those used inprometheus/client_golang
. We could, however, vendorgh.neting.cc/golang/protobuf/proto
via import rewriting withinprometheus/client_model
. All the Prometheus protomessages would be incompatible with other protomessages, but that should not be an issue. It would bloat the resulting code somewhat, though.github.com/golang/protobuf/proto
has ~10k LOC.Pros and cons have to be weighed carefully. Also, solutions for dependency management as they are established within the Go community should be taken into account to not pick contradicting approaches.
@brian-brazil @peterbourgon @juliusv @fabxc
The text was updated successfully, but these errors were encountered: