Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

go module install etcd go.etcd.io/etcd/clientv3 will install a version from the wrong repo #10398

Closed
Sahasrara opened this issue Jan 12, 2019 · 8 comments

Comments

@Sahasrara
Copy link

go module install etcd go.etcd.io/etcd/clientv3 will install a version from the wrong repo:

My mod file says:
go.etcd.io/etcd v3.3.11+incompatible

but when I go to the vendor directory, all of the files have references to the coreos repo.

@bcmills
Copy link

bcmills commented Jan 25, 2019

Assuming that you do not want to break existing users of v3.3.11 and below, a proper fix will probably require that you bump the major version to v4 and change the corresponding module and import paths to go.etcd.io/etcd/v4.

@outshow
Copy link

outshow commented Jan 26, 2019

I am experiencing the same problem。

I get an error while building code:
undefined: clientv3.WithFragment

image

@jingyih
Copy link
Contributor

jingyih commented Mar 4, 2019

cc @jpbetz

@Acconut
Copy link

Acconut commented Mar 4, 2019

I experience a similar problem with Go 1.12, where I get following error during compilation when using the go.etcd.io/etcd/clientv3 package:

# github.com/tus/tusd/etcd3locker
etcd3locker/locker.go:140:38: cannot use locker.Client (type *"go.etcd.io/etcd/clientv3".Client) as type *"github.com/coreos/etcd/clientv3".Client in argument to concurrency.NewSession

(Available at https://github.com/tus/tusd/blob/master/etcd3locker/locker.go#L140)

I am not entirely sure if it's related but this issue only started appearing after I activated the Go module support. Are there any known workarounds?

@hexfusion
Copy link
Contributor

@Acconut for now your going to need to use github.com/coreos/etcd as a dep revendor and import accordingly. 3.3.x is still in the old org. We will move to go.etcd.io in 3.4

Acconut added a commit to tus/tusd that referenced this issue Mar 5, 2019
The go.etcd.io/etcd package has not yet been officially released
and using it caused problems in conjunction with Go Modules.
(see etcd-io/etcd#10398 (comment))
@Acconut
Copy link

Acconut commented Mar 5, 2019

@hexfusion Thank you very much, I wasn't aware that this version is not yet released. Using github.com/coreos/etcd fixed my issues.

@timestee
Copy link

cannot use s.client (type *"go.etcd.io/etcd/clientv3".Client) as type *"github.com/coreos/etcd/clientv3".Client in argument to concurrency.NewSession

same issue, such a big mess!

@stale
Copy link

stale bot commented Apr 6, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Apr 6, 2020
@stale stale bot closed this as completed May 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

7 participants