This repository was archived by the owner on Sep 9, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1k
This repository was archived by the owner on Sep 9, 2020. It is now read-only.
"panic: runtime error: index out of range" when dealing with git repo without HEAD #1051
Copy link
Copy link
Closed
Description
What version of Go (go version
) and dep
(git describe --tags
) are you using?
$ go version
go version go1.8.3 darwin/amd64
$ git describe --tags
v0.3.0-151-g1f6d6bb
What dep
command did you run?
$ dep ensure -v
Root project is "<acme>/source/<foo>.git"
3 transitively valid internal packages
7 external packages imported from 7 projects
(0) ✓ select (root)
(1) ? attempt github.com/go-sql-driver/mysql with 1 pkgs; at least 1 versions to try
(1) try github.com/go-sql-driver/[email protected]
(1) ✓ select github.com/go-sql-driver/[email protected] w/1 pkgs
(2) ? attempt github.com/kr/beanstalk with 1 pkgs; at least 1 versions to try
(2) try github.com/kr/beanstalk@master
(2) ✓ select github.com/kr/beanstalk@master w/1 pkgs
(3) ? attempt github.com/spf13/viper with 1 pkgs; at least 1 versions to try
(3) try github.com/spf13/[email protected]
panic: runtime error: index out of range
goroutine 35 [running]:
github.com/golang/dep/internal/gps.(*gitSource).listVersions(0xc420289270, 0x16d7bc0, 0xc42028c2d0, 0x1010f98, 0x10, 0x1470d80, 0xc420049801, 0xc420289280)
/private/tmp/dep-20170804-6202-1xy28iy/dep-0.3.0/src/github.com/golang/dep/internal/gps/vcs_source.go:231 +0xd48
github.com/golang/dep/internal/gps.maybeGitSource.try.func1(0x16d7bc0, 0xc42028c2d0, 0x16d78c0, 0xc420266700)
/private/tmp/dep-20170804-6202-1xy28iy/dep-0.3.0/src/github.com/golang/dep/internal/gps/maybe_source.go:106 +0x71
github.com/golang/dep/internal/gps.(*supervisor).do(0xc420287b90, 0x16d7900, 0xc4200146d8, 0x14d8826, 0xc, 0x1, 0xc420049938, 0xc42000e1c8, 0x0)
/private/tmp/dep-20170804-6202-1xy28iy/dep-0.3.0/src/github.com/golang/dep/internal/gps/source_manager.go:618 +0xd5
github.com/golang/dep/internal/gps.maybeGitSource.try(0xc42021cf00, 0x16d7900, 0xc4200146d8, 0xc42028a180, 0x16, 0x16daa20, 0xc420266780, 0xc420287b90, 0x0, 0x0, ...)
/private/tmp/dep-20170804-6202-1xy28iy/dep-0.3.0/src/github.com/golang/dep/internal/gps/maybe_source.go:110 +0x212
github.com/golang/dep/internal/gps.maybeSources.try(0xc4201d3e80, 0x4, 0x4, 0x16d7900, 0xc4200146d8, 0xc42028a180, 0x16, 0x16daa20, 0xc420266780, 0xc420287b90, ...)
/private/tmp/dep-20170804-6202-1xy28iy/dep-0.3.0/src/github.com/golang/dep/internal/gps/maybe_source.go:35 +0xf1
github.com/golang/dep/internal/gps.(*maybeSources).try(0xc4202c65a0, 0x16d7900, 0xc4200146d8, 0xc42028a180, 0x16, 0x16daa20, 0xc420266780, 0xc420287b90, 0x100eb93, 0xc42003abd0, ...)
<autogenerated>:216 +0xc7
github.com/golang/dep/internal/gps.(*sourceGateway).require(0xc42001bb00, 0x16d7900, 0xc4200146d8, 0x1, 0x40, 0x0, 0x0)
/private/tmp/dep-20170804-6202-1xy28iy/dep-0.3.0/src/github.com/golang/dep/internal/gps/source.go:489 +0x243
github.com/golang/dep/internal/gps.(*sourceGateway).sourceURL(0xc42001bb00, 0x16d7900, 0xc4200146d8, 0x0, 0x0, 0x0, 0x0)
/private/tmp/dep-20170804-6202-1xy28iy/dep-0.3.0/src/github.com/golang/dep/internal/gps/source.go:457 +0xbc
github.com/golang/dep/internal/gps.(*sourceCoordinator).getSourceGatewayFor(0xc42001b800, 0x16d7900, 0xc4200146d8, 0xc4201d3101, 0x31, 0x0, 0x0, 0x0, 0x0, 0x0)
/private/tmp/dep-20170804-6202-1xy28iy/dep-0.3.0/src/github.com/golang/dep/internal/gps/source.go:156 +0xcc3
github.com/golang/dep/internal/gps.(*SourceMgr).SyncSourceFor(0xc42001b8c0, 0xc4201d3101, 0x31, 0x0, 0x0, 0x0, 0x0)
/private/tmp/dep-20170804-6202-1xy28iy/dep-0.3.0/src/github.com/golang/dep/internal/gps/source_manager.go:462 +0x8b
github.com/golang/dep/internal/gps.(*bridge).SyncSourceFor(0xc4202a8780, 0xc4201d3101, 0x31, 0x0, 0x0, 0xc4202c0d80, 0x7)
/private/tmp/dep-20170804-6202-1xy28iy/dep-0.3.0/src/github.com/golang/dep/internal/gps/bridge.go:219 +0x5b
created by github.com/golang/dep/internal/gps.(*solver).selectRoot
/private/tmp/dep-20170804-6202-1xy28iy/dep-0.3.0/src/github.com/golang/dep/internal/gps/solver.go:557 +0x87f
$ dep hash-inputs
-CONSTRAINTS-
github.com/go-sql-driver/mysql
svc-^1.3.0
github.com/kr/beanstalk
b-master
github.com/spf13/pflag
svc-^1.0.0
github.com/spf13/viper
svc-^1.0.0
<acme>/source/<bar>.git
b-develop
<acme>/source/<baz>.git
b-develop
-IMPORTS/REQS-
github.com/go-sql-driver/mysql
github.com/kr/beanstalk
github.com/spf13/pflag
github.com/spf13/viper
<acme>/source/<bar>.git
<acme>/source/<qux>.git
<acme>/source/<baz>.git
-IGNORES-
-OVERRIDES-
-ANALYZER-
dep
1
What did you expect to see?
Normal dep ensure
function
What did you see instead?
A panic