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
{{ message }}
This repository has been archived by the owner on Sep 9, 2020. It is now read-only.
The problem affects both dep ensure and dep init. The root cause seems to be that my project directly imports another project, github.com/jacobsimpson/gobfile, which does not yet exist as a Github repository. I have it locally in my $GOPATH so builds work. I was able to confirm that a direct dependency on a non-existent Github project will hang both dep init and dep ensure by removing all dependencies on github.com/jacobsimpson/gobfile from my project, at which time dep worked as expected.
What version of 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 ensure -v
Root project is "github.com/jacobsimpson/gob"
5 transitively valid internal packages
2 external packages imported from 2 projects
(0) ✓ select(root)
(1) ? attempt github.com/spf13/pflag with 1 pkgs; at least 1 versions to try
(1) try github.com/spf13/pflag@v1.0.0
(1) ✓ selectgithub.com/spf13/pflag@v1.0.0 w/1 pkgs
-v option should show the package that is currently in progress. The -v output I saw from dep ensure lead me to believe that dep was hanging trying to update github.com/spf13/pflag. It was the pstree output that showed me the root cause. Once I saw dep was trying to download github.com/jacobsimpson/gobfile I knew why it was failing.
Ideally dep would recognize a local package and let that substitute for trying to download something into vendor.
dep should recognize that the package github.com/jacobsimpson/gobfile doesn't exist and produce an error message to that effect rather than hang trying to get it.
What did you see instead?
Hanging
The text was updated successfully, but these errors were encountered:
Came here to post this exact issue. Infinite hanging really caught me off guard. The dep documentation also (afaik) does not address this issue, so as a first time dep user you can waste a lot of time trying to understand why dep init isn't working.
@jacobsimpson I have been struggling to get dep init to work for three days now. I am grateful I stumbled on this.
Were you able to get it to work for you? If yes, can you share what you did?
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!
The problem affects both
dep ensure
anddep init
. The root cause seems to be that my project directly imports another project,github.com/jacobsimpson/gobfile
, which does not yet exist as a Github repository. I have it locally in my$GOPATH
so builds work. I was able to confirm that a direct dependency on a non-existent Github project will hang bothdep init
anddep ensure
by removing all dependencies ongithub.com/jacobsimpson/gobfile
from my project, at which timedep
worked as expected.What version of
dep
are you using (dep version
)?What
dep
command did you run?pstree
for the hung process shows:pstree
for the hung process shows:What did you expect to see?
Couple of things:
-v
option should show the package that is currently in progress. The-v
output I saw fromdep ensure
lead me to believe thatdep
was hanging trying to updategithub.com/spf13/pflag
. It was thepstree
output that showed me the root cause. Once I sawdep
was trying to downloadgithub.com/jacobsimpson/gobfile
I knew why it was failing.dep
would recognize a local package and let that substitute for trying to download something intovendor
.dep
should recognize that the packagegithub.com/jacobsimpson/gobfile
doesn't exist and produce an error message to that effect rather than hang trying to get it.What did you see instead?
The text was updated successfully, but these errors were encountered: