Please answer these questions before submitting your issue. Thanks!
What version of Go are you using (go version)?
go version go1.10 linux/amd64 vgo:2018-02-20.1
Does this issue reproduce with the latest release?
Latest vgo release is installed.
What operating system and processor architecture are you using (go env)?
GOARCH="amd64"
GOBIN=""
GOCACHE="/home/anli/.cache/go-build"
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/home/anli/.go"
GORACE=""
GOROOT="/usr/lib/go"
GOTMPDIR=""
GOTOOLDIR="/usr/lib/go/pkg/tool/linux_amd64"
GCCGO="gccgo"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
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-build533228468=/tmp/go-build -gno-record-gcc-switches"
What did you do?
Here is a minimal example application that triggers the error:
package main // import "github.com/klingtnet/vgo-non-semantic-version-issue"
// vgo-non-semantic-version-issue.go
import (
"log"
"github.com/coreos/go-systemd/activation"
)
func main() {
_, err := activation.Listeners(true)
if err != nil {
log.Fatalf("cannot retrieve listeners: %s", err)
}
}
First, create an empty go.mod file to get it populated by vgo on the first run: touch go.mod.
Second, build the application:
$ vgo build vgo-non-semantic-version-issue.go
vgo: resolving import "github.com/coreos/go-systemd/activation"
vgo: finding github.com/coreos/go-systemd (latest)
vgo: adding github.com/coreos/go-systemd v1
Everything is fine, application was build successfully but the generated mod.go refers to a non-existing git tag:
$ cat go.mod
module "github.com/klingtnet/vgo-non-semantic-version-issue"
require "github.com/coreos/go-systemd" v1
A second build will now fail with a non-descriptive error message:
$ vgo build vgo-non-semantic-version-issue.go
vgo: finding github.com/coreos/go-systemd v1.0.0
vgo: github.com/coreos/go-systemd v1.0.0: unexpected status (https://api.github.com/repos/coreos/go-systemd/git/refs/tags/v1.0.0): 404 Not Found
vgo: finding github.com/coreos/go-systemd v1.0.0
vgo: github.com/coreos/go-systemd v1.0.0: unexpected status (https://api.github.com/repos/coreos/go-systemd/git/refs/tags/v1.0.0): 404 Not Found
vgo: unexpected status (https://api.github.com/repos/coreos/go-systemd/git/refs/tags/v1.0.0): 404 Not Found
What did you expect to see?
An error message like
Dependency uses non-semantic versioning, abort
or something alike.
What did you see instead?
See above.
PS: I looked for a similar issue but couldn't find one so I opened this issue.
Please answer these questions before submitting your issue. Thanks!
What version of Go are you using (
go version)?go version go1.10 linux/amd64 vgo:2018-02-20.1Does this issue reproduce with the latest release?
Latest
vgorelease is installed.What operating system and processor architecture are you using (
go env)?What did you do?
Here is a minimal example application that triggers the error:
First, create an empty
go.modfile to get it populated byvgoon the first run:touch go.mod.Second, build the application:
$ vgo build vgo-non-semantic-version-issue.go vgo: resolving import "github.com/coreos/go-systemd/activation" vgo: finding github.com/coreos/go-systemd (latest) vgo: adding github.com/coreos/go-systemd v1Everything is fine, application was build successfully but the generated
mod.gorefers to a non-existing git tag:A second build will now fail with a non-descriptive error message:
What did you expect to see?
An error message like
or something alike.
What did you see instead?
See above.
PS: I looked for a similar issue but couldn't find one so I opened this issue.