You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Please answer these questions before submitting your issue. Thanks!
What version of Go are you using (go version)?
$ vgo version
go version go1.10 darwin/amd64 vgo:2018-02-20.1
Does this issue reproduce with the latest release?
Yes.
What operating system and processor architecture are you using (go env)?
GOARCH="amd64"
GOOS="darwin"
What did you do?
In a new directory, created a malformed go.mod, all it contains is a comment line, ran vgo build.
If possible, provide a recipe for reproducing the error.
A complete runnable program is good.
A link on play.golang.org is best.
mkdir n
cd n
echo '//' > go.mod
vgo build
What did you expect to see?
Expected to see an error about a malformed go.mod file or message that the module path cannot be determined, as when there is no go.mod, the go.mod is empty, or the go.mod has something other than just a comment line.
Please answer these questions before submitting your issue. Thanks!
What version of Go are you using (
go version
)?$ vgo version
go version go1.10 darwin/amd64 vgo:2018-02-20.1
Does this issue reproduce with the latest release?
Yes.
What operating system and processor architecture are you using (
go env
)?GOARCH="amd64"
GOOS="darwin"
What did you do?
In a new directory, created a malformed go.mod, all it contains is a comment line, ran vgo build.
If possible, provide a recipe for reproducing the error.
A complete runnable program is good.
A link on play.golang.org is best.
mkdir n
cd n
echo '//' > go.mod
vgo build
What did you expect to see?
Expected to see an error about a malformed go.mod file or message that the module path cannot be determined, as when there is no go.mod, the go.mod is empty, or the go.mod has something other than just a comment line.
What did you see instead?
$ vgo build
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x13721a0]
goroutine 1 [running]:
golang.org/x/vgo/vendor/cmd/go/internal/vgo.InitMod()
/Users/frank/x/go/src/golang.org/x/vgo/vendor/cmd/go/internal/vgo/init.go:143 +0x370
golang.org/x/vgo/vendor/cmd/go/internal/vgo.ImportPaths(0xc4200b6010, 0x0, 0x0, 0xc4201fa390, 0x1, 0x1)
/Users/frank/x/go/src/golang.org/x/vgo/vendor/cmd/go/internal/vgo/load.go:68 +0x38
golang.org/x/vgo/vendor/cmd/go/internal/load.ImportPaths(0xc4200b6010, 0x0, 0x0, 0x1012359, 0x10452cf, 0x43)
/Users/frank/x/go/src/golang.org/x/vgo/vendor/cmd/go/internal/load/pkg.go:1485 +0x4f
golang.org/x/vgo/vendor/cmd/go/internal/load.PackagesAndErrors(0xc4200b6010, 0x0, 0x0, 0xc4201d9aa0, 0x103469b, 0x43)
/Users/frank/x/go/src/golang.org/x/vgo/vendor/cmd/go/internal/load/pkg.go:1457 +0xac
golang.org/x/vgo/vendor/cmd/go/internal/load.PackagesForBuild(0xc4200b6010, 0x0, 0x0, 0x10, 0x10, 0x14b5e80)
/Users/frank/x/go/src/golang.org/x/vgo/vendor/cmd/go/internal/load/pkg.go:1499 +0x5d
golang.org/x/vgo/vendor/cmd/go/internal/work.runBuild(0x17b4780, 0xc4200b6010, 0x0, 0x0)
/Users/frank/x/go/src/golang.org/x/vgo/vendor/cmd/go/internal/work/build.go:301 +0x85
golang.org/x/vgo/vendor/cmd/go.Main()
/Users/frank/x/go/src/golang.org/x/vgo/vendor/cmd/go/main.go:155 +0x82e
main.main()
/Users/frank/x/go/src/golang.org/x/vgo/main.go:37 +0x25
The text was updated successfully, but these errors were encountered: