I'm working on a branch instead of master on bitbucket.org, I have up to date with this branch but still has this issue. When I switch on the master branch and deleted all the vendor things tried to regenerate, it turned out with the same issue.
dep are you using (dep version)?dep version
```dep:
version : v0.4.1
build date : 2018-01-27
git hash : 37d9ea0
go version : go1.9.3
go compiler : gc
platform : darwin/amd64
<!--
-->
### What `dep` command did you run?
` dep init -v`
<!--
-->
### What did you expect to see?
Generate Gopkg.toml, Gopkg.lock, and vendor/
### What did you see instead?
```Getting direct dependencies...
Checked 28 directories for packages.
Found 15 direct dependencies.
Root project is "bitbucket.org/nirmata/go-agent"
18 transitively valid internal packages
16 external packages imported from 15 projects
(0) โ select (root)
(1) ? attempt bitbucket.org/nirmata/go-avro with 1 pkgs; 1 versions to try
(1) try bitbucket.org/nirmata/go-avro@master
(1) โ select bitbucket.org/nirmata/go-avro@master w/1 pkgs
(2) ? attempt bitbucket.org/nirmata/go-jsonmessenger with 1 pkgs; 1 versions to try
(2) try bitbucket.org/nirmata/go-jsonmessenger@master
(2) โ select bitbucket.org/nirmata/go-jsonmessenger@master w/1 pkgs
(3) ? attempt bitbucket.org/nirmata/go-configfiles with 1 pkgs; 1 versions to try
(3) try bitbucket.org/nirmata/go-configfiles@master
(3) โ select bitbucket.org/nirmata/go-configfiles@master w/1 pkgs
(4) ? attempt gopkg.in/fsnotify.v1 with 1 pkgs; 0 versions to try
panic: version queue is empty, should not happen`
goroutine 1 [running]:
github.com/golang/dep/gps.(*solver).findValidVersion(0xc420576240, 0xc42024e460, 0xc420410850, 0x1, 0x1, 0x0, 0xc420410850)
/private/tmp/dep-20180127-56413-19vc2ou/src/github.com/golang/dep/gps/solver.go:927 +0x53f
github.com/golang/dep/gps.(*solver).createVersionQueue(0xc420576240, 0xc420455461, 0x14, 0x0, 0x0, 0xc420410850, 0x1, 0x1, 0x0, 0x0, ...)
/private/tmp/dep-20180127-56413-19vc2ou/src/github.com/golang/dep/gps/solver.go:914 +0x955
github.com/golang/dep/gps.(*solver).solve(0xc420576240, 0x17e7e40, 0xc420014070, 0x0, 0xc4205b27e0, 0xc4205b2840)
/private/tmp/dep-20180127-56413-19vc2ou/src/github.com/golang/dep/gps/solver.go:517 +0x5b0
github.com/golang/dep/gps.(*solver).Solve(0xc420576240, 0x17e7e40, 0xc420014070, 0xc42034b1a0, 0xc4200160de, 0x1e, 0xc42034ad20)
/private/tmp/dep-20180127-56413-19vc2ou/src/github.com/golang/dep/gps/solver.go:457 +0xe4
main.(*initCommand).Run(0xc420157ed2, 0xc420059080, 0xc42000e1d0, 0x0, 0x0, 0x0, 0x0)
/private/tmp/dep-20180127-56413-19vc2ou/src/github.com/golang/dep/cmd/dep/init.go:156 +0x5fc
main.(*Config).Run(0xc420058f60, 0xc420058f60)
/private/tmp/dep-20180127-56413-19vc2ou/src/github.com/golang/dep/cmd/dep/main.go:210 +0x11cb
main.main()
/private/tmp/dep-20180127-56413-19vc2ou/src/github.com/golang/dep/cmd/dep/main.go:52 +0x1fc
I have a similar panic when I try to dep ensure -update:
$ go version
go version go1.10.1 darwin/amd64
$ dep version
dep:
version : v0.4.1
build date : 2018-01-27
git hash : 37d9ea0
go version : go1.9.3
go compiler : gc
platform : darwin/amd64
$ dep ensure -update
panic: version queue is empty, should not happen
goroutine 1 [running]:
github.com/golang/dep/gps.(*solver).findValidVersion(0xc42030cc60, 0xc420677540, 0xc4206ab0c0, 0x1, 0x1, 0x0, 0xc4206ab0c0)
/private/tmp/dep-20180127-69957-1mynnnl/src/github.com/golang/dep/gps/solver.go:927 +0x53f
github.com/golang/dep/gps.(*solver).createVersionQueue(0xc42030cc60, 0xc420204740, 0x14, 0x0, 0x0, 0xc4206ab0c0, 0x1, 0x1, 0x0, 0x0, ...)
/private/tmp/dep-20180127-69957-1mynnnl/src/github.com/golang/dep/gps/solver.go:914 +0x955
github.com/golang/dep/gps.(*solver).solve(0xc42030cc60, 0x17e7e40, 0xc4200160a0, 0x1, 0xc42030af00, 0xc42030af60)
/private/tmp/dep-20180127-69957-1mynnnl/src/github.com/golang/dep/gps/solver.go:517 +0x5b0
github.com/golang/dep/gps.(*solver).Solve(0xc42030cc60, 0x17e7e40, 0xc4200160a0, 0x1843a90, 0xc42001e034, 0x1d, 0xc4202f8300)
/private/tmp/dep-20180127-69957-1mynnnl/src/github.com/golang/dep/gps/solver.go:457 +0xe4
main.(*ensureCommand).runUpdate(0xc420159f06, 0xc42005d080, 0xc42000e1d0, 0x0, 0x0, 0xc42005d0e0, 0x17eb320, 0xc42005d6e0, 0xc42001e004, 0x4d, ...)
/private/tmp/dep-20180127-69957-1mynnnl/src/github.com/golang/dep/cmd/dep/ensure.go:389 +0x2c0
main.(*ensureCommand).Run(0xc420159f06, 0xc42005d080, 0xc42000e1d0, 0x0, 0x0, 0x0, 0x0)
/private/tmp/dep-20180127-69957-1mynnnl/src/github.com/golang/dep/cmd/dep/ensure.go:218 +0x838
main.(*Config).Run(0xc42005cf60, 0xc42005cf60)
/private/tmp/dep-20180127-69957-1mynnnl/src/github.com/golang/dep/cmd/dep/main.go:210 +0x11cb
main.main()
/private/tmp/dep-20180127-69957-1mynnnl/src/github.com/golang/dep/cmd/dep/main.go:52 +0x1fc
Same issue for me. This occurs on a dep init for a large project with many dependencies (tried running it after deleting the existing vendor directory).
โ go version
go version go1.10.1 darwin/amd64
โ dep version
dep:
version : v0.4.1
build date : 2018-01-27
git hash : 37d9ea0
go version : go1.9.3
go compiler : gc
platform : darwin/amd64
panic: version queue is empty, should not happen
goroutine 1 [running]:
github.com/golang/dep/gps.(*solver).findValidVersion(0xc42055e120, 0xc420a78e60, 0xc420352560, 0x1, 0x1, 0x0, 0xc420352560)
/private/tmp/dep-20180127-38430-r7nlwc/src/github.com/golang/dep/gps/solver.go:927 +0x53f
github.com/golang/dep/gps.(*solver).createVersionQueue(0xc42055e120, 0xc4200a8fe1, 0x14, 0x0, 0x0, 0xc420352560, 0x1, 0x1, 0x0, 0x0, ...)
/private/tmp/dep-20180127-38430-r7nlwc/src/github.com/golang/dep/gps/solver.go:914 +0x955
github.com/golang/dep/gps.(*solver).solve(0xc42055e120, 0x17e7e40, 0xc42008c010, 0x0, 0xc420650060, 0xc4206500c0)
/private/tmp/dep-20180127-38430-r7nlwc/src/github.com/golang/dep/gps/solver.go:517 +0x5b0
github.com/golang/dep/gps.(*solver).Solve(0xc42055e120, 0x17e7e40, 0xc42008c010, 0xc42031b530, 0xc4200140b8, 0x2a, 0xc4208157d0)
/private/tmp/dep-20180127-38430-r7nlwc/src/github.com/golang/dep/gps/solver.go:457 +0xe4
main.(*initCommand).Run(0xc420171e72, 0xc420097020, 0xc420082020, 0x0, 0x0, 0x0, 0x0)
/private/tmp/dep-20180127-38430-r7nlwc/src/github.com/golang/dep/cmd/dep/init.go:156 +0x5fc
main.(*Config).Run(0xc420096f00, 0xc420096f00)
/private/tmp/dep-20180127-38430-r7nlwc/src/github.com/golang/dep/cmd/dep/main.go:210 +0x11cb
main.main()
/private/tmp/dep-20180127-38430-r7nlwc/src/github.com/golang/dep/cmd/dep/main.go:52 +0x1fc
Added some extra debugging, and for me this is the call causing the failure:
result of:
newVersionQueue(id: gps.ProjectIdentifier{ProjectRoot:"gopkg.in/fsnotify.v1", Source:""}, lockv: <nil>, prefv: <nil>, s.b: &gps.bridge{...})
is:
&gps.versionQueue{id:gps.ProjectIdentifier{ProjectRoot:"gopkg.in/fsnotify.v1", Source:""}, pi:[]gps.Version{}, lockv:gps.Version(nil), prefv:gps.Version(nil), fails:[]gps.failedVersion(nil), b:(*gps.bridge)(0xc420368120), failed:false, allLoaded:true, adverr:error(nil)}
It looks like it has something to do with the gopkg.in/fsnotify.v1 project/import.
Same issue here, also caused by gopkg.in/fsnotify.v1
The same thing:
$ go version
go version go1.10.1 linux/amd64
$ dep version
dep:
version : devel
build date :
git hash :
go version : go1.10.1
go compiler : gc
platform : linux/amd64
features : ImportDuringSolve=false
md5-cba195535896336cf93d44a94ddcdf60
$ dep ensure -v
Root project is "github.com/omniscale/imposm3"
31 transitively valid internal packages
8 external packages imported from 6 projects
(0) โ select (root)
(1) ? attempt gopkg.in/fsnotify.v1 with 1 pkgs; 0 versions to try
panic: version queue is empty, should not happen
goroutine 1 [running]:
...
Seems to be solved by specifying source options in Gopkg.toml:
[[constraint]]
source = "https://github.com/fsnotify/fsnotify/archive/v1.4.7.tar.gz"
name = "gopkg.in/fsnotify.v1"
I may be wrong (most likely), but I think the problem in different pathes to fsnotify: on the page https://gopkg.in/fsnotify.v1 there is gopkg.in/fsnotify/fsnotify.v1 path used:
go get gopkg.in/fsnotify/fsnotify.v1
I've specified source in Gopkg.toml, and got another error:
dep ensure -v
Warning: the following project(s) have [[constraint]] stanzas in Gopkg.toml:
โ github.com/contiv/contivmodel
โ gopkg.in/fsnotify.v1
However, these projects are not direct dependencies of the current project:
they are not imported in any .go files, nor are they in the 'required' list in
Gopkg.toml. Dep only applies [[constraint]] rules to direct dependencies, so
these rules will have no effect.
Either import/require packages from these projects so that they become direct
dependencies, or convert each [[constraint]] to an [[override]] to enforce rules
on these projects, if they happen to be transitive dependencies,
Root project is "bitbucket.org/nirmata/go-agent"
18 transitively valid internal packages
16 external packages imported from 15 projects
(0) โ select (root)
(1) ? attempt bitbucket.org/nirmata/go-avro with 1 pkgs; at least 1 versions to try
(1) try bitbucket.org/nirmata/go-avro@master
(1) โ select bitbucket.org/nirmata/go-avro@master w/1 pkgs
(2) ? attempt bitbucket.org/nirmata/go-configfiles with 1 pkgs; at least 1 versions to try
(2) try bitbucket.org/nirmata/go-configfiles@master
(2) โ select bitbucket.org/nirmata/go-configfiles@master w/1 pkgs
(3) ? attempt github.com/c9s/goprocinfo with 1 pkgs; at least 1 versions to try
(3) try github.com/c9s/goprocinfo@master
(3) โ select github.com/c9s/goprocinfo@master w/1 pkgs
(4) ? attempt bitbucket.org/nirmata/go-servicedb with 1 pkgs; at least 1 versions to try
(4) try bitbucket.org/nirmata/go-servicedb@master
(4) โ select bitbucket.org/nirmata/go-servicedb@master w/1 pkgs
(5) ? attempt bitbucket.org/nirmata/go-jsonmessenger with 1 pkgs; at least 1 versions to try
(5) try bitbucket.org/nirmata/go-jsonmessenger@master
(5) โ select bitbucket.org/nirmata/go-jsonmessenger@master w/1 pkgs
(6) ? attempt github.com/docker/go-connections with 1 pkgs; at least 1 versions to try
(6) try github.com/docker/[email protected]
(6) โ select github.com/docker/[email protected] w/1 pkgs
(7) ? attempt github.com/fsouza/go-dockerclient with 1 pkgs; at least 1 versions to try
(7) try github.com/fsouza/go-dockerclient@e991fbef2be0da8fb99e1cf882acb7eef5f3c1f2
(7) โ select github.com/fsouza/go-dockerclient@e991fbef2be0da8fb99e1cf882acb7eef5f3c1f2 w/1 pkgs
(8) ? attempt github.com/Microsoft/go-winio with 1 pkgs; at least 1 versions to try
(8) try github.com/Microsoft/[email protected]
(8) โ select github.com/Microsoft/[email protected] w/1 pkgs
(9) ? attempt github.com/deniswernert/go-fstab with 1 pkgs; at least 1 versions to try
(9) try github.com/deniswernert/go-fstab@master
(9) โ select github.com/deniswernert/go-fstab@master w/1 pkgs
(10) ? attempt github.com/gorilla/mux with 1 pkgs; at least 1 versions to try
(10) try github.com/gorilla/[email protected]
(10) โ select github.com/gorilla/[email protected] w/1 pkgs
(11) ? attempt bitbucket.org/nirmata/go-wssconn with 1 pkgs; at least 1 versions to try
(11) try bitbucket.org/nirmata/go-wssconn@master
(11) โ select bitbucket.org/nirmata/go-wssconn@master w/1 pkgs
(12) ? attempt github.com/gorilla/websocket with 1 pkgs; at least 1 versions to try
(12) try github.com/gorilla/[email protected]
(12) โ select github.com/gorilla/[email protected] w/1 pkgs
(13) ? attempt github.com/linkedin/goavro with 1 pkgs; at least 1 versions to try
(13) try github.com/linkedin/[email protected]
(13) โ select github.com/linkedin/[email protected] w/1 pkgs
(14) ? attempt github.com/golang/glog with 1 pkgs; at least 1 versions to try
(14) try github.com/golang/glog@master
(14) โ select github.com/golang/glog@master w/1 pkgs
(15) ? attempt github.com/docker/docker with 7 pkgs; at least 1 versions to try
(15) try github.com/docker/[email protected]
(15) โ select github.com/docker/[email protected] w/25 pkgs
(16) ? attempt github.com/Azure/go-ansiterm with 2 pkgs; at least 1 versions to try
(16) try github.com/Azure/go-ansiterm@master
(16) โ select github.com/Azure/go-ansiterm@master w/2 pkgs
(17) ? attempt github.com/Sirupsen/logrus with 1 pkgs; at least 1 versions to try
(17) try github.com/Sirupsen/[email protected]
(17) โ select github.com/Sirupsen/[email protected] w/1 pkgs
(18) ? attempt gopkg.in/fsnotify.v1 with 1 pkgs; at least 1 versions to try
(18) try gopkg.in/[email protected]
(18) โ unable to update checked out version: fatal: reference is not a tree: c2828203cd70a50dcccfb2761f8b1f8ceef9a8e9
(18) : command failed: [git checkout c2828203cd70a50dcccfb2761f8b1f8ceef9a8e9]: exit status 128
(18) โ no more versions of gopkg.in/fsnotify.v1 to try; begin backtrack
(17) โ backtrack: no more versions of github.com/Sirupsen/logrus to try
(16) โ backtrack: no more versions of github.com/Azure/go-ansiterm to try
(15) โ backtrack: no more versions of github.com/docker/docker to try
(14) โ backtrack: no more versions of github.com/golang/glog to try
(13) โ backtrack: no more versions of github.com/linkedin/goavro to try
(12) โ backtrack: no more versions of github.com/gorilla/websocket to try
(11) โ backtrack: no more versions of bitbucket.org/nirmata/go-wssconn to try
(10) โ backtrack: no more versions of github.com/gorilla/mux to try
(9) โ backtrack: no more versions of github.com/deniswernert/go-fstab to try
(8) โ backtrack: no more versions of github.com/Microsoft/go-winio to try
(7) โ backtrack: no more versions of github.com/fsouza/go-dockerclient to try
(6) โ backtrack: no more versions of github.com/docker/go-connections to try
(5) โ backtrack: no more versions of bitbucket.org/nirmata/go-jsonmessenger to try
(4) โ backtrack: no more versions of bitbucket.org/nirmata/go-servicedb to try
(3) โ backtrack: no more versions of github.com/c9s/goprocinfo to try
(2) โ backtrack: no more versions of bitbucket.org/nirmata/go-configfiles to try
(2) ? continue bitbucket.org/nirmata/go-configfiles with 1 pkgs; 1 more versions to try
(2) try bitbucket.org/nirmata/go-configfiles@master
(2) โ select bitbucket.org/nirmata/go-configfiles@master w/1 pkgs
(3) ? attempt bitbucket.org/nirmata/go-jsonmessenger with 1 pkgs; at least 1 versions to try
(3) try bitbucket.org/nirmata/go-jsonmessenger@master
(3) โ select bitbucket.org/nirmata/go-jsonmessenger@master w/1 pkgs
(4) ? attempt github.com/docker/docker with 25 pkgs; at least 1 versions to try
(4) try github.com/docker/[email protected]
(4) โ select github.com/docker/[email protected] w/25 pkgs
(5) ? attempt bitbucket.org/nirmata/go-servicedb with 1 pkgs; at least 1 versions to try
(5) try bitbucket.org/nirmata/go-servicedb@master
(5) โ select bitbucket.org/nirmata/go-servicedb@master w/1 pkgs
(6) ? attempt github.com/Azure/go-ansiterm with 2 pkgs; at least 1 versions to try
(6) try github.com/Azure/go-ansiterm@master
(6) โ select github.com/Azure/go-ansiterm@master w/2 pkgs
(7) ? attempt github.com/deniswernert/go-fstab with 1 pkgs; at least 1 versions to try
(7) try github.com/deniswernert/go-fstab@master
(7) โ select github.com/deniswernert/go-fstab@master w/1 pkgs
(8) ? attempt github.com/Microsoft/go-winio with 1 pkgs; at least 1 versions to try
(8) try github.com/Microsoft/[email protected]
(8) โ select github.com/Microsoft/[email protected] w/1 pkgs
(9) ? attempt github.com/docker/go-units with 1 pkgs; at least 1 versions to try
(9) try github.com/docker/[email protected]
(9) โ select github.com/docker/[email protected] w/1 pkgs
(10) ? attempt bitbucket.org/nirmata/go-wssconn with 1 pkgs; at least 1 versions to try
(10) try bitbucket.org/nirmata/go-wssconn@master
(10) โ select bitbucket.org/nirmata/go-wssconn@master w/1 pkgs
(11) ? attempt github.com/deckarep/golang-set with 1 pkgs; at least 1 versions to try
(11) try github.com/deckarep/[email protected]
(11) โ select github.com/deckarep/[email protected] w/1 pkgs
(12) ? attempt github.com/satori/go.uuid with 1 pkgs; at least 1 versions to try
(12) try github.com/satori/[email protected]
(12) โ select github.com/satori/[email protected] w/1 pkgs
(13) ? attempt github.com/Sirupsen/logrus with 1 pkgs; at least 1 versions to try
(13) try github.com/Sirupsen/[email protected]
(13) โ select github.com/Sirupsen/[email protected] w/1 pkgs
(14) ? attempt github.com/nirmataoss/go-envflag with 1 pkgs; at least 1 versions to try
(14) try github.com/nirmataoss/go-envflag@master
(14) โ select github.com/nirmataoss/go-envflag@master w/1 pkgs
(15) ? attempt github.com/fsouza/go-dockerclient with 1 pkgs; at least 1 versions to try
(15) try github.com/fsouza/go-dockerclient@e991fbef2be0da8fb99e1cf882acb7eef5f3c1f2
(15) โ select github.com/fsouza/go-dockerclient@e991fbef2be0da8fb99e1cf882acb7eef5f3c1f2 w/1 pkgs
(16) ? revisit github.com/docker/docker to add 7 pkgs
(16) โ include 25 more pkgs from github.com/docker/[email protected]
(16) ? attempt github.com/docker/go-connections with 1 pkgs; at least 1 versions to try
(17) try github.com/docker/[email protected]
(17) โ select github.com/docker/[email protected] w/1 pkgs
(17) ? attempt golang.org/x/sys with 1 pkgs; at least 1 versions to try
(18) try golang.org/x/sys@master
(18) โ select golang.org/x/sys@master w/1 pkgs
(18) ? attempt github.com/c9s/goprocinfo with 1 pkgs; at least 1 versions to try
(19) try github.com/c9s/goprocinfo@master
(19) โ select github.com/c9s/goprocinfo@master w/1 pkgs
(19) ? attempt github.com/gorilla/mux with 1 pkgs; at least 1 versions to try
(20) try github.com/gorilla/[email protected]
(20) โ select github.com/gorilla/[email protected] w/1 pkgs
(20) ? attempt github.com/julienschmidt/httprouter with 1 pkgs; at least 1 versions to try
(21) try github.com/julienschmidt/httprouter@e1b9828bc9e5904baec057a154c09ca40fe7fae0
(21) โ select github.com/julienschmidt/httprouter@e1b9828bc9e5904baec057a154c09ca40fe7fae0 w/1 pkgs
(21) ? attempt github.com/orcaman/concurrent-map with 1 pkgs; at least 1 versions to try
(22) try github.com/orcaman/concurrent-map@master
(22) โ select github.com/orcaman/concurrent-map@master w/1 pkgs
(22) ? attempt github.com/golang/glog with 1 pkgs; at least 1 versions to try
(23) try github.com/golang/glog@master
(23) โ select github.com/golang/glog@master w/1 pkgs
(23) ? attempt github.com/nirmataoss/go-ini with 1 pkgs; at least 1 versions to try
(24) try github.com/nirmataoss/go-ini@master
(24) โ select github.com/nirmataoss/go-ini@master w/1 pkgs
(24) ? attempt github.com/hashicorp/go-cleanhttp with 1 pkgs; at least 1 versions to try
(25) try github.com/hashicorp/go-cleanhttp@master
(25) โ select github.com/hashicorp/go-cleanhttp@master w/1 pkgs
(25) ? attempt golang.org/x/net with 1 pkgs; at least 1 versions to try
(26) try golang.org/x/net@master
(26) โ select golang.org/x/net@master w/1 pkgs
(26) ? revisit golang.org/x/sys to add 1 pkgs
(27) โ include 1 more pkgs from golang.org/x/sys@master
(26) ? attempt github.com/gorilla/websocket with 1 pkgs; at least 1 versions to try
(28) try github.com/gorilla/[email protected]
(28) โ select github.com/gorilla/[email protected] w/1 pkgs
(27) ? revisit golang.org/x/sys to add 1 pkgs
(29) โ include 1 more pkgs from golang.org/x/sys@master
(27) ? attempt github.com/linkedin/goavro with 1 pkgs; at least 1 versions to try
(30) try github.com/linkedin/[email protected]
(30) โ select github.com/linkedin/[email protected] w/1 pkgs
(28) ? attempt github.com/golang/snappy with 1 pkgs; at least 1 versions to try
(31) try github.com/golang/snappy@master
(31) โ select github.com/golang/snappy@master w/1 pkgs
(29) ? attempt gopkg.in/fsnotify.v1 with 1 pkgs; at least 1 versions to try
(32) try gopkg.in/[email protected]
(32) โ unable to update checked out version: fatal: reference is not a tree: c2828203cd70a50dcccfb2761f8b1f8ceef9a8e9
(32) : command failed: [git checkout c2828203cd70a50dcccfb2761f8b1f8ceef9a8e9]: exit status 128
(32) โ no more versions of gopkg.in/fsnotify.v1 to try; begin backtrack
(31) โ backtrack: no more versions of github.com/golang/snappy to try
(30) โ backtrack: no more versions of github.com/linkedin/goavro to try
(29) โ backtrack: popped 1 pkgs from golang.org/x/sys
(28) โ backtrack: no more versions of github.com/gorilla/websocket to try
(27) โ backtrack: popped 1 pkgs from golang.org/x/sys
(26) โ backtrack: no more versions of golang.org/x/net to try
(25) โ backtrack: no more versions of github.com/hashicorp/go-cleanhttp to try
(24) โ backtrack: no more versions of github.com/nirmataoss/go-ini to try
(23) โ backtrack: no more versions of github.com/golang/glog to try
(22) โ backtrack: no more versions of github.com/orcaman/concurrent-map to try
(21) โ backtrack: no more versions of github.com/julienschmidt/httprouter to try
(20) โ backtrack: no more versions of github.com/gorilla/mux to try
(19) โ backtrack: no more versions of github.com/c9s/goprocinfo to try
(18) โ backtrack: no more versions of golang.org/x/sys to try
(17) โ backtrack: no more versions of github.com/docker/go-connections to try
(16) โ backtrack: popped 25 pkgs from github.com/docker/docker
(15) โ backtrack: no more versions of github.com/fsouza/go-dockerclient to try
(14) โ backtrack: no more versions of github.com/nirmataoss/go-envflag to try
(13) โ backtrack: no more versions of github.com/Sirupsen/logrus to try
(12) โ backtrack: no more versions of github.com/satori/go.uuid to try
(11) โ backtrack: no more versions of github.com/deckarep/golang-set to try
(10) โ backtrack: no more versions of bitbucket.org/nirmata/go-wssconn to try
(9) โ backtrack: no more versions of github.com/docker/go-units to try
(8) โ backtrack: no more versions of github.com/Microsoft/go-winio to try
(7) โ backtrack: no more versions of github.com/deniswernert/go-fstab to try
(6) โ backtrack: no more versions of github.com/Azure/go-ansiterm to try
(5) โ backtrack: no more versions of bitbucket.org/nirmata/go-servicedb to try
(4) โ backtrack: no more versions of github.com/docker/docker to try
(3) โ backtrack: no more versions of bitbucket.org/nirmata/go-jsonmessenger to try
(2) โ backtrack: no more versions of bitbucket.org/nirmata/go-configfiles to try
(2) โ backtrack: no more versions of bitbucket.org/nirmata/go-configfiles to try
(1) โ backtrack: no more versions of bitbucket.org/nirmata/go-avro to try
โ solving failed
Solver wall times by segment:
b-source-exists: 29.968646824s
b-list-pkgs: 4.8587194s
b-gmal: 3.924457943s
b-rev-present-in: 1.023676186s
b-deduce-proj-root: 429.16952ms
unselect: 38.120418ms
satisfy: 35.971288ms
select-atom: 35.389744ms
new-atom: 1.958438ms
select-root: 525.02ยตs
backtrack: 361.96ยตs
other: 113.329ยตs
b-list-versions: 35.03ยตs
add-atom: 13.509ยตs
TOTAL: 40.317158609s
Solving failure: No versions of gopkg.in/fsnotify.v1 met constraints:
v1.4.7: unable to update checked out version: fatal: reference is not a tree: c2828203cd70a50dcccfb2761f8b1f8ceef9a8e9
: command failed: [git checkout c2828203cd70a50dcccfb2761f8b1f8ceef9a8e9]: exit status 128
Thanks for the tip -- specifying the source for fsnotify did indeed fix the issue. Here's the constraint I used for the repo, which updates the source for the repo itself rather than tying it to a specific version:
[[constraint]]
name = "gopkg.in/fsnotify.v1"
source = "https://github.com/fsnotify/fsnotify.git"
@pcyeol as specified in the warning message at the top of your run, the constraint is not used because you don't have fsnotify as a direct dependency.
You either need to add required = ["gopkg.in/fsnotify.v1"] to manually specify that the dependency is required or use an [[override]] instead of [[constraint]] to specify that this should be used for transitive dependencies as well.
@nmiyake It finally works! Sorry for this mistake.
Thanks!
I received the exact same error as everyone else though the problem for me stemmed from the fact that a dependency was only in $GOPATH and not pushed to a repository. Once I pushed my project onto GitHub dep was able to pull it and continued on without the panic.
Output before I pushed the new dependency.
$ dep ensure -v
Root project is "github.com/something/somewhere"
10 transitively valid internal packages
23 external packages imported from 14 projects
(0) โ select (root)
(1) ? attempt github.com/gogo/googleapis with 1 pkgs; at least 1 versions to try
(1) try github.com/gogo/[email protected]
(1) โ select github.com/gogo/[email protected] w/1 pkgs
(2) ? attempt github.com/gogo/protobuf with 2 pkgs; at least 1 versions to try
(2) try github.com/gogo/protobuf@master
(2) โ select github.com/gogo/protobuf@master w/25 pkgs
(3) ? attempt github.com/grpc-ecosystem/grpc-gateway with 2 pkgs; at least 1 versions to try
(3) try github.com/grpc-ecosystem/[email protected]
(3) โ select github.com/grpc-ecosystem/[email protected] w/3 pkgs
(4) ? revisit github.com/gogo/protobuf to add 1 pkgs
(4) โ include 2 more pkgs from github.com/gogo/protobuf@master
(4) ? attempt github.com/golang/protobuf with 1 pkgs; at least 1 versions to try
(5) try github.com/golang/[email protected]
(5) โ select github.com/golang/[email protected] w/1 pkgs
(5) ? revisit github.com/golang/protobuf to add 3 pkgs
(6) โ include 5 more pkgs from github.com/golang/[email protected]
(5) ? attempt github.com/pkg/errors with 1 pkgs; at least 1 versions to try
(7) try github.com/pkg/[email protected]
(7) โ select github.com/pkg/[email protected] w/1 pkgs
(6) ? attempt github.com/magefile/mage with 4 pkgs; at least 1 versions to try
(8) try github.com/magefile/[email protected]
(8) โ select github.com/magefile/[email protected] w/8 pkgs
(7) ? attempt github.com/mattn/go-isatty with 1 pkgs; at least 1 versions to try
(9) try github.com/mattn/[email protected]
(9) โ select github.com/mattn/[email protected] w/1 pkgs
(8) ? attempt google.golang.org/grpc with 1 pkgs; at least 1 versions to try
(10) try google.golang.org/[email protected]
(10) โ select google.golang.org/[email protected] w/1 pkgs
(9) ? attempt golang.org/x/net with 1 pkgs; at least 1 versions to try
(11) try golang.org/x/net@master
(11) โ select golang.org/x/net@master w/1 pkgs
(10) ? attempt github.com/spf13/cobra with 1 pkgs; at least 1 versions to try
(12) try github.com/spf13/[email protected]
(12) โ select github.com/spf13/[email protected] w/1 pkgs
(11) ? attempt github.com/inconshreveable/mousetrap with 1 pkgs; at least 1 versions to try
(13) try github.com/inconshreveable/[email protected]
(13) โ select github.com/inconshreveable/[email protected] w/1 pkgs
(12) ? revisit google.golang.org/grpc to add 5 pkgs
(14) โ include 23 more pkgs from google.golang.org/[email protected]
(12) ? revisit github.com/golang/protobuf to add 1 pkgs
(15) โ include 5 more pkgs from github.com/golang/[email protected]
(12) ? revisit golang.org/x/net to add 3 pkgs
(16) โ include 7 more pkgs from golang.org/x/net@master
(12) ? attempt github.com/mitchellh/go-homedir with 1 pkgs; at least 1 versions to try
(17) try github.com/mitchellh/go-homedir@master
(17) โ select github.com/mitchellh/go-homedir@master w/1 pkgs
(13) ? attempt github.com/rs/zerolog with 1 pkgs; at least 1 versions to try
(18) try github.com/rs/[email protected]
(18) โ select github.com/rs/[email protected] w/3 pkgs
(14) ? attempt github.com/sean-/sysexits with 1 pkgs; at least 1 versions to try
(19) try github.com/sean-/sysexits@master
(19) โ select github.com/sean-/sysexits@master w/1 pkgs
(15) ? attempt github.com/spf13/pflag with 1 pkgs; at least 1 versions to try
(20) try github.com/spf13/[email protected]
(20) โ select github.com/spf13/[email protected] w/1 pkgs
(16) ? attempt github.com/cheapRoc/grpc-zerolog with 1 pkgs; 0 versions to try
panic: version queue is empty, should not happen
goroutine 1 [running]:
github.com/golang/dep/gps.(*solver).findValidVersion(0xc4201d6000, 0xc4206ee6e0, 0xc42048c6c0, 0x1, 0x1, 0x0, 0xc42048c6c0)
/Users/justinreagor/go/src/github.com/golang/dep/gps/solver.go:927 +0x4d7
github.com/golang/dep/gps.(*solver).createVersionQueue(0xc4201d6000, 0xc4202c2f20, 0x20, 0x0, 0x0, 0xc42048c6c0, 0x1, 0x1, 0x0, 0x0, ...)
/Users/justinreagor/go/src/github.com/golang/dep/gps/solver.go:914 +0x93f
github.com/golang/dep/gps.(*solver).solve(0xc4201d6000, 0x15b6f60, 0xc4200240b8, 0x40, 0x40, 0x8)
/Users/justinreagor/go/src/github.com/golang/dep/gps/solver.go:517 +0x5b7
github.com/golang/dep/gps.(*solver).Solve(0xc4201d6000, 0x15b6f60, 0xc4200240b8, 0xc420498ac0, 0x20, 0x20, 0xc42025ad00)
/Users/justinreagor/go/src/github.com/golang/dep/gps/solver.go:457 +0xe4
main.(*ensureCommand).runDefault(0xc4201779a6, 0xc4200830e0, 0xc4201907d0, 0x0, 0x0, 0xc420083140, 0x15ba6e0, 0xc4200836e0, 0xc42002c104, 0x3c, ...)
/Users/justinreagor/go/src/github.com/golang/dep/cmd/dep/ensure.go:301 +0x168
main.(*ensureCommand).Run(0xc4201779a6, 0xc4200830e0, 0xc4201907d0, 0x0, 0x0, 0x0, 0x0)
/Users/justinreagor/go/src/github.com/golang/dep/cmd/dep/ensure.go:219 +0x867
main.(*Config).Run(0xc420082fc0, 0x0)
/Users/justinreagor/go/src/github.com/golang/dep/cmd/dep/main.go:232 +0x10e5
main.main()
/Users/justinreagor/go/src/github.com/golang/dep/cmd/dep/main.go:69 +0x52c
Output after pushing into
github.com/cheapRoc/grpc-zerolog.
$ dep ensure -v
Root project is "github.com/something/somewhere"
10 transitively valid internal packages
23 external packages imported from 14 projects
(0) โ select (root)
(1) ? attempt github.com/gogo/googleapis with 1 pkgs; at least 1 versions to try
(1) try github.com/gogo/[email protected]
(1) โ select github.com/gogo/[email protected] w/1 pkgs
(2) ? attempt github.com/gogo/protobuf with 2 pkgs; at least 1 versions to try
(2) try github.com/gogo/protobuf@master
(2) โ select github.com/gogo/protobuf@master w/25 pkgs
(3) ? attempt github.com/golang/protobuf with 1 pkgs; at least 1 versions to try
(3) try github.com/golang/[email protected]
(3) โ select github.com/golang/[email protected] w/1 pkgs
(4) ? revisit github.com/gogo/protobuf to add 1 pkgs
(4) โ include 2 more pkgs from github.com/gogo/protobuf@master
(4) ? attempt github.com/magefile/mage with 4 pkgs; at least 1 versions to try
(5) try github.com/magefile/[email protected]
(5) โ select github.com/magefile/[email protected] w/8 pkgs
(5) ? attempt github.com/pkg/errors with 1 pkgs; at least 1 versions to try
(6) try github.com/pkg/[email protected]
(6) โ select github.com/pkg/[email protected] w/1 pkgs
(6) ? attempt github.com/mattn/go-isatty with 1 pkgs; at least 1 versions to try
(7) try github.com/mattn/[email protected]
(7) โ select github.com/mattn/[email protected] w/1 pkgs
(7) ? attempt github.com/grpc-ecosystem/grpc-gateway with 2 pkgs; at least 1 versions to try
(8) try github.com/grpc-ecosystem/[email protected]
(8) โ select github.com/grpc-ecosystem/[email protected] w/3 pkgs
(8) ? revisit github.com/golang/protobuf to add 3 pkgs
(9) โ include 5 more pkgs from github.com/golang/[email protected]
(8) ? attempt google.golang.org/grpc with 5 pkgs; at least 1 versions to try
(10) try google.golang.org/[email protected]
(10) โ select google.golang.org/[email protected] w/23 pkgs
(9) ? revisit github.com/golang/protobuf to add 1 pkgs
(11) โ include 5 more pkgs from github.com/golang/[email protected]
(9) ? attempt github.com/sean-/sysexits with 1 pkgs; at least 1 versions to try
(12) try github.com/sean-/sysexits@master
(12) โ select github.com/sean-/sysexits@master w/1 pkgs
(10) ? attempt github.com/rs/zerolog with 1 pkgs; at least 1 versions to try
(13) try github.com/rs/[email protected]
(13) โ select github.com/rs/[email protected] w/3 pkgs
(11) ? attempt golang.org/x/net with 1 pkgs; at least 1 versions to try
(14) try golang.org/x/net@master
(14) โ select golang.org/x/net@master w/1 pkgs
(12) ? attempt github.com/mitchellh/go-homedir with 1 pkgs; at least 1 versions to try
(15) try github.com/mitchellh/go-homedir@master
(15) โ select github.com/mitchellh/go-homedir@master w/1 pkgs
(13) ? attempt golang.org/x/sys with 1 pkgs; at least 1 versions to try
(16) try golang.org/x/sys@master
(16) โ select golang.org/x/sys@master w/1 pkgs
(14) ? attempt github.com/spf13/cobra with 1 pkgs; at least 1 versions to try
(17) try github.com/spf13/[email protected]
(17) โ select github.com/spf13/[email protected] w/1 pkgs
(15) ? revisit google.golang.org/grpc to add 1 pkgs
(18) โ include 1 more pkgs from google.golang.org/[email protected]
(15) ? attempt github.com/inconshreveable/mousetrap with 1 pkgs; at least 1 versions to try
(19) try github.com/inconshreveable/[email protected]
(19) โ select github.com/inconshreveable/[email protected] w/1 pkgs
(16) ? attempt github.com/spf13/pflag with 1 pkgs; at least 1 versions to try
(20) try github.com/spf13/[email protected]
(20) โ select github.com/spf13/[email protected] w/1 pkgs
(17) ? revisit golang.org/x/net to add 3 pkgs
(21) โ include 7 more pkgs from golang.org/x/net@master
(17) ? attempt golang.org/x/text with 3 pkgs; at least 1 versions to try
(22) try golang.org/x/[email protected]
(22) โ select golang.org/x/[email protected] w/14 pkgs
(18) ? attempt github.com/cheapRoc/grpc-zerolog with 1 pkgs; 1 versions to try
(23) try github.com/cheapRoc/grpc-zerolog@master
(23) โ select github.com/cheapRoc/grpc-zerolog@master w/1 pkgs
(19) ? attempt google.golang.org/genproto with 1 pkgs; at least 1 versions to try
(24) try google.golang.org/genproto@master
(24) โ select google.golang.org/genproto@master w/1 pkgs
(20) ? revisit github.com/golang/protobuf to add 1 pkgs
(25) โ include 2 more pkgs from github.com/golang/[email protected]
โ found solution with 101 packages from 19 projects
Solver wall times by segment:
b-gmal: 4.093737545s
b-list-versions: 2.228174748s
b-source-exists: 532.982574ms
b-list-pkgs: 238.051886ms
satisfy: 16.805345ms
select-atom: 16.248513ms
new-atom: 740.559ยตs
select-root: 301.624ยตs
b-deduce-proj-root: 179.201ยตs
other: 158.315ยตs
add-atom: 39.024ยตs
b-matches: 8.633ยตs
b-pair-rev: 4.848ยตs
b-pair-version: 1.214ยตs
TOTAL: 7.127434029s
(1/19) Wrote github.com/mattn/[email protected]
(2/19) Wrote github.com/pkg/[email protected]
(3/19) Wrote github.com/grpc-ecosystem/[email protected]
(4/19) Wrote github.com/inconshreveable/[email protected]
(5/19) Wrote github.com/sean-/sysexits@master
(6/19) Wrote github.com/mitchellh/go-homedir@master
(7/19) Wrote github.com/gogo/[email protected]
(8/19) Wrote github.com/cheapRoc/grpc-zerolog@master
(9/19) Wrote github.com/spf13/[email protected]
(10/19) Wrote github.com/spf13/[email protected]
(11/19) Wrote github.com/golang/[email protected]
(12/19) Wrote google.golang.org/[email protected]
(13/19) Wrote golang.org/x/sys@master
(14/19) Wrote google.golang.org/genproto@master
(15/19) Wrote golang.org/x/net@master
(16/19) Wrote github.com/magefile/[email protected]
(17/19) Wrote github.com/rs/[email protected]
(18/19) Wrote golang.org/x/[email protected]
(19/19) Wrote github.com/gogo/protobuf@master
It is possible this is an entirely different issue but logging here since it has the same error message.
I think it's better.
[[constraint]]
name = "gopkg.in/fsnotify.v1"
source = "gopkg.in/fsnotify/fsnotify.v1"
This finally worked if someone is still having issues:
EDIT Nevermind, constraint with source = "gopkg.in/fsnotify/fsnotify.v1" works
Had to change to override, constraint was still unhappy.
[[override]]
source = "https://github.com/fsnotify/fsnotify/archive/v1.4.7.tar.gz"
name = "gopkg.in/fsnotify.v1"
I am on 0.5.0
dep:
version : v0.5.0
build date : 2018-07-26
git hash : 224a564
go version : go1.10.3
go compiler : gc
platform : darwin/amd64
features : ImportDuringSolve=false
Sometimes I get this, not for fsnotify like the others, so if you'd like, I'll make a new issue for it.
I generally get this when I delete Gopkg.lock and re-run dep ensure
It seems ambiguous whether the issue is with the lock files/gopkg.toml, or the remote repositories, or whether keeping or deleting the vendor folder plays a role.
The most common theme is a problem/broken code/imports in one of the packages I'm using.
For example, if I break a utility package that's used by multiple application's repositories, dep ensure will often fail with this vague error.
I get this on both Windows and Ubuntu.
Will add more comments as I try and get a generic, reproducible test case.
I saw the same panic: version queue is empty, should not happen error for the fsnotify.v1 package when I ran dep ensure and per @nmiyake's comment https://github.com/golang/dep/issues/1799#issuecomment-381190562 above, adding the following in Gopkg.toml resolved the error for me and then dep ensure worked fine:
[[override]]
name = "gopkg.in/fsnotify.v1"
source = "https://github.com/fsnotify/fsnotify.git"
My kubebuilder, dep and go versions:
$ kubebuilder version
Version: version.Version{KubeBuilderVersion:"2.0.0-alpha.1", KubernetesVendor:"1.14.1", GitCommit:"a39cc1a586046d50a74455da6c44da734d2fb8fc", BuildDate:"2019-05-17T23:21:23Z", GoOs:"unknown", GoArch:"unknown"}
$ dep version
dep:
version : devel
build date :
git hash :
go version : go1.12.4
go compiler : gc
platform : linux/amd64
features : ImportDuringSolve=false
$ go version
go version go1.12.4 linux/amd64
I am receiving this error too when doing a dep init
Error:
$ dep init
Importing configuration from godep. These are only initial constraints, and are further refined during the solve process.
Importing configuration from godep. These are only initial constraints, and are further refined during the solve process.
panic: version queue is empty, should not happen: gopkg.in/fsnotify.v1
goroutine 1 [running]:
github.com/golang/dep/gps.(*solver).findValidVersion(0xc0000ee100, 0xc00026ea00, 0xc000399020, 0x1, 0x1, 0x0, 0xc000399020)
/private/tmp/dep-20190614-48387-1iw5fry/src/github.com/golang/dep/gps/solver.go:915 +0x55a
github.com/golang/dep/gps.(*solver).createVersionQueue(0xc0000ee100, 0xc0006cec61, 0x14, 0x0, 0x0, 0xc000399020, 0x1, 0x1, 0x0, 0x0, ...)
/private/tmp/dep-20190614-48387-1iw5fry/src/github.com/golang/dep/gps/solver.go:902 +0x472
github.com/golang/dep/gps.(*solver).solve(0xc0000ee100, 0x16e3660, 0xc0000260e0, 0x5, 0xc0000c2e58, 0xc000101698)
/private/tmp/dep-20190614-48387-1iw5fry/src/github.com/golang/dep/gps/solver.go:505 +0x543
github.com/golang/dep/gps.(*solver).Solve(0xc0000ee100, 0x16e3660, 0xc0000260e0, 0xc00027a660, 0xc00002a0b9, 0x2c, 0xc000197920)
/private/tmp/dep-20190614-48387-1iw5fry/src/github.com/golang/dep/gps/solver.go:440 +0x1eb
main.(*initCommand).Run(0xc00017b71a, 0xc0000ec880, 0xc00000f7c0, 0x0, 0x0, 0x0, 0x0)
/private/tmp/dep-20190614-48387-1iw5fry/src/github.com/golang/dep/cmd/dep/init.go:155 +0x5ad
main.(*Config).Run(0xc000080ea0, 0x0)
/private/tmp/dep-20190614-48387-1iw5fry/src/github.com/golang/dep/cmd/dep/main.go:212 +0x111c
main.main()
/private/tmp/dep-20190614-48387-1iw5fry/src/github.com/golang/dep/cmd/dep/main.go:84 +0x636
Dep Info:
$ dep version
dep:
version : v0.5.4
build date : 2019-06-14
git hash : 1f7c19e
go version : go1.12.6
go compiler : gc
platform : darwin/amd64
features : ImportDuringSolve=false
Go Info:
$ go version
go version go1.13.1 darwin/amd64
Dep was officially deprecated earlier this year, and the proposal to archive this repository was accepted. As such, I'm closing outstanding issues before archiving the repository. For any further comments, please use the proposal thread on the Go issue tracker. Thanks!
Most helpful comment
Thanks for the tip -- specifying the source for fsnotify did indeed fix the issue. Here's the constraint I used for the repo, which updates the source for the repo itself rather than tying it to a specific version: