weaveworks / common

Libraries used in multiple Weave projects
Other
129 stars 92 forks source link

Make gogo.proto import vendoring agnostic #265

Closed krajorama closed 1 year ago

krajorama commented 1 year ago

prometheus/alertmanager imports gogo.proto as gogoproto/gogo.proto

This is because it does not use vendoring and needs to look up gogoproto in the module cache, which results in a path like /home/user/go/pkg/mod/github.com/gogo/protobuf@v1.3.2.

To avoid having @v1.3.2 in the proto definition it then sets this as an include path and import only gogoproto/gogo.proto.

This is an issue because protoc is not smart enough to recognize that github.com/gogo/protobuf/gogoproto/gogo.proto and gogoproto/gogo.proto are the same.

Signed-off-by: György Krajcsovits gyorgy.krajcsovits@grafana.com

krajorama commented 1 year ago

Testing mimir build in https://github.com/grafana/mimir/pull/3524