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

cmd/go: <go module bug with github.com/ugorji/go > #29332

Closed
xiachengjia opened this issue Dec 19, 2018 · 9 comments
Closed

cmd/go: <go module bug with github.com/ugorji/go > #29332

xiachengjia opened this issue Dec 19, 2018 · 9 comments
Labels
FrozenDueToAge modules WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided.

Comments

@xiachengjia
Copy link

xiachengjia commented Dec 19, 2018

What version of Go are you using (go version)?

$ go version
go version go1.11.4 linux/amd64

Does this issue reproduce with the latest release?

yes

What operating system and processor architecture are you using (go env)?

go env Output
$ go env
GOARCH="amd64"
GOBIN=""
GOCACHE="/home/benjamin/.cache/go-build"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/home/benjamin/go"
GOPROXY=""
GORACE=""
GOROOT="/home/benjamin/.go"
GOTMPDIR=""
GOTOOLDIR="/home/benjamin/.go/pkg/tool/linux_amd64"
GCCGO="gccgo"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD="/home/benjamin/go/src/github.com/bigpigeon/Test/go/etcd_bug/go.mod"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build419003286=/tmp/go-build -gno-record-gcc-switches"

What did you do?

code in github gist

What did you expect to see?

nothing

What did you see instead?

panic: codecgen version mismatch: current: 8, need 10. Re-generate file: /home/benjamin/go/pkg/mod/go.etcd.io/etcd@v3.3.10+incompatible/client/keys.generated.go

goroutine 1 [running]:
go.etcd.io/etcd/client.init.0()
	/home/benjamin/go/pkg/mod/go.etcd.io/etcd@v3.3.10+incompatible/client/keys.generated.go:45 +0x104
@xiachengjia
Copy link
Author

I guess is git project cannot named go keyword

@xiachengjia
Copy link
Author

xiachengjia commented Dec 19, 2018

I try to specify github.com/ugorji/go version to v1.1.1
but still not work
/home/benjamin/go/pkg/mod/go.etcd.io/etcd@v3.3.10+incompatible/client/keys.generated.go:15:2: unknown import path "github.com/ugorji/go/codec": ambiguous import: found github.com/ugorji/go/codec in multiple modules:
github.com/ugorji/go v1.1.1 (/home/benjamin/go/pkg/mod/github.com/ugorji/go@v1.1.1/codec)
github.com/ugorji/go/codec v0.0.0-20181209151446-772ced7fd4c2 (/home/benjamin/go/pkg/mod/github.com/ugorji/go/codec@v0.0.0-20181209151446-772ced7fd4c2)

@bcmills
Copy link
Contributor

bcmills commented Dec 19, 2018

github.com/ugorji/go/codec was moved into its own module in commit e253f1f20942.

So you really do have two copies of the package: if you want the version from github.com/ugorji/go v1.1.1, then you'll need to remove the one in github.com/ugorji/go/codec. (go get github.com/ugorji/go/codec@none should do the trick.)

Please try that and let us know if you're still stuck.

@bcmills bcmills added WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided. modules Question labels Dec 19, 2018
@xiachengjia
Copy link
Author

awesome, go build was work
but when I try to invoke etcd.Client.GetVersion method, it will block

@agnivade
Copy link
Contributor

What do you mean by "it will block" ? Is it still an issue with Go ?

@agnivade agnivade added WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided. and removed WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided. labels Dec 23, 2018
@xiachengjia
Copy link
Author

@agnivade
when I use the newest etcd it work well
but on my old server's etcd will block
work well etcd version:

$ ./etcd -version
etcd Version: 3.3.0+git
Git SHA: 9113019
Go Version: go1.11.4
Go OS/Arch: linux/amd64

will block etcd version:

$ ./etcd -version
etcd Version: 3.2.0-rc.0
Git SHA: 7e6d876
Go Version: go1.8.1
Go OS/Arch: linux/amd64

@agnivade
Copy link
Contributor

Sorry, I still do not understand what do you mean by "block" and how is this a Go issue ?

To clarify - your original issue was a versioning problem which got resolved. Now, from what I understand, this is a separate issue with etcd versions. Could you kindly clarify my questions ?

Thanks.

@xiachengjia
Copy link
Author

code in github gist
when I try to connect my old server etcd , and print it's Version, the client will block

"block" means the program does not quit itself

@agnivade
Copy link
Contributor

This sounds like an etcd issue rather than a Go bug. Have you tried filing a bug in the etcd repo ? In any case, this is a separate issue than the original bug.

If you think this is a Go bug, please open a new issue with more details which can point to somewhere in the core standard library or runtime. Like, dump a goroutine stack trace when its stuck.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge modules WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided.
Projects
None yet
Development

No branches or pull requests

4 participants