-
Notifications
You must be signed in to change notification settings - Fork 18.4k
Description
Please answer these questions before submitting your issue. Thanks!
What did you do?
mkdir project
cd project
export GO111MODULE=on
go mod init project
go get github.com/micro/[email protected]
What did you expect to see?
successful download of dependency
What did you see instead?
go: finding github.com/nats-io/nats.go v1.8.2-0.20190607221125-9f4d16fe7c2d
go: github.com/nats-io/[email protected]: unknown revision 9f4d16fe7c2d
go: error loading module requirements
Does this issue reproduce with the latest release (go1.12.7)?
yes
System details
go version go1.12.7 darwin/amd64
GOARCH="amd64"
GOBIN=""
GOCACHE="/Users/a8327/Library/Caches/go-build"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOOS="darwin"
GOPATH="/Users/a8327/go"
GOPROXY=""
GORACE=""
GOROOT="/usr/local/Cellar/go/1.12.6/libexec"
GOTMPDIR=""
GOTOOLDIR="/usr/local/Cellar/go/1.12.6/libexec/pkg/tool/darwin_amd64"
GCCGO="gccgo"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
GOMOD="/dev/null"
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 -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/09/xght07y913s83cqxlwc_x3z017ny38/T/go-build408435640=/tmp/go-build -gno-record-gcc-switches -fno-common"
Note:
The case is that github.com/micro/[email protected]
has a mod file https://github.com/micro/go-plugins/blob/v1.0.0/go.mod
which requires github.com/nats-io/go-nats v1.7.0
Repository github.com/nats-io/go-nats
is archived and probably redirects to https://github.com/nats-io/nats.go
.
However, github.com/nats-io/nats.go
does not have commit 9f4d16fe7c2d
at all. Probably, it was here at some point but then was removed. So go get
tries download non-existing commit from the master branch instead of latest tag 1.8.1
in github.com/nats-io/nats.go
.
The same error will pop up, if we specify the dependency in go.mod
and run go build
.