kitex-contrib / registry-etcd

Apache License 2.0
21 stars 25 forks source link

内嵌包go.opentelemetry.io/otel导致go get失败 #15

Closed ghost closed 1 year ago

ghost commented 1 year ago

github.com/kitex-contrib/registry-etcd tested by github.com/kitex-contrib/registry-etcd.test imports go.etcd.io/etcd/server/v3/embed imports go.opentelemetry.io/otel/semconv: module go.opentelemetry.io/otel@latest found (v1.11.2), but does not contain package go.opentelemetry.io/otel/semconv

lizhemingi commented 1 year ago

Sorry I didn't get the point and can not reproduce your error by go get or go mod tidy.

Can you give me a more clear step to reproduce it ?

ghost commented 1 year ago

Sorry I didn't get the point and can not reproduce your error by go get or go mod tidy.

Can you give me a more clear step to reproduce it ?

Thank you for your reply, I deleted the old package, re-executed go get, and it worked

Bubbleioa commented 1 year ago

I met the same issue, this module relies on go.etcd.io/etcd/client/v3 v3.5.1 => go.opentelemetry.io/otel v0.20.0, which will break dependencies when other module rely on go.opentelemetry.io/otel v1.x.x You could add these lines to your go.mod to fix this.

replace (
    go.etcd.io/etcd/client/v3 => go.etcd.io/etcd/client/v3 v3.5.7
    go.etcd.io/etcd/server/v3 => go.etcd.io/etcd/server/v3 v3.5.7
)