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

invalid version: unknown revision 000000000000 when sync dependencies under github.com/opencurve/curve/tools-v2 #2056

Closed
Sindweller opened this issue Nov 9, 2022 · 3 comments
Assignees
Labels
question Further information is requested

Comments

@Sindweller
Copy link
Contributor

Errors when sync dependencies of github.com/opencurve/curve/tools-v2

When I tried to sync the dependecies, an error occured:

sindweller@xindeweiladeMacBook-Pro tools-v2 % pwd
/Users/sindweller/Documents/work/curve/tools-v2
sindweller@xindeweiladeMacBook-Pro tools-v2 % go list -m all
go: github.com/optiopay/kafka@v0.0.0-00010101000000-000000000000: invalid version: unknown revision 000000000000

I found kafka is in cilium's go.mod

module github.com/cilium/cilium

go 1.18
...
require github.com/optiopay/kafka v0.0.0-00010101000000-000000000000
...
replace github.com/optiopay/kafka => github.com/cilium/kafka v0.0.0-20180809090225-01ce283b732b

I googled and get an answer which hits the same error as mine, not sure it is the real reason. See go mod fails to find version v0.0.0-00010101000000-000000000000 of a dependency

So I add replace github.com/optiopay/kafka => github.com/cilium/kafka v0.0.0-20180809090225-01ce283b732b to my go.mod under tools-v2/ package. Then run go mod tidy, everything works well.

Now my go.mod looks like:

module github.com/opencurve/curve/tools-v2

go 1.19

replace github.com/optiopay/kafka => github.com/cilium/kafka v0.0.0-20180809090225-01ce283b732b

require (
...
)

output of my go env:

sindweller@xindeweiladeMacBook-Pro tools-v2 % go env
GO111MODULE="on"
GOARCH="amd64"
GOBIN="/usr/local/go/bin"
GOCACHE="/Users/sindweller/Library/Caches/go-build"
GOENV="/Users/sindweller/Library/Application Support/go/env"
GOEXE=""
GOEXPERIMENT=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOINSECURE=""
GOMODCACHE="/Users/sindweller/go/pkg/mod"
GOOS="darwin"
GOPATH="/Users/sindweller/go"
GOPROXY="https://goproxy.cn,direct"
GOROOT="/usr/local/go"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/usr/local/go/pkg/tool/darwin_amd64"
GOVCS=""
GOVERSION="go1.19.3"
GCCGO="gccgo"
GOAMD64="v1"
AR="ar"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
GOMOD="/Users/sindweller/Documents/work/curve/tools-v2/go.mod"
GOWORK=""
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"

Any ideas of what causes this dependency error? Or it's just me with my config of go having this problem😭

@Sindweller Sindweller added the question Further information is requested label Nov 9, 2022
@Cyber-SiKu Cyber-SiKu assigned Cyber-SiKu and unassigned ilixiaocui Nov 10, 2022
@Cyber-SiKu
Copy link
Contributor

I also reproduced this problem, it seems to be a problem with the cilium package.

@shentupenghui
Copy link
Contributor

It happened just the same
also by add

module github.com/opencurve/curve/tools-v2

go 1.19

replace github.com/optiopay/kafka => github.com/cilium/kafka v0.0.0-20180809090225-01ce283b732b

require (
...
)

to solve this.
and according to cilium/go.mod:https://github.com/cilium/cilium/blob/master/go.mod
it's replace the package too

replace (
	...
	github.com/optiopay/kafka => github.com/cilium/kafka v0.0.0-20180809090225-01ce283b732b

	go.universe.tf/metallb => github.com/cilium/metallb v0.1.1-0.20220829170633-5d7dfb1129f7

	k8s.io/client-go => github.com/cilium/client-go v0.0.0-20220824093223-b6557c021e53

	// Using private fork of controller-tools. See commit msg for more context
	// as to why we are using a private fork.
	sigs.k8s.io/controller-tools => github.com/cilium/controller-tools v0.6.2
)

seems it's better to add the replace statement in master branch

@shentupenghui
Copy link
Contributor

already fixed in pr: #2088

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

4 participants