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.
  
  
dep init/ensure hangs when hg not found #1643
Copy link
Copy link
Closed
Description
What version of dep are you using (dep version)?
Built from source:
$ go version
go version go1.9.1 darwin/amd64
$ cd $GOPATH/src/github.com/golang/dep && git describe --tags
v0.4.1-37-g70b4da73
What dep command did you run?
Context:
$ pwd
/Users/icio/go/src/github.com/icio/dep-ensure-hang-repro
$ ls
main.go
$ cat main.go
package main
import "bitbucket.org/zombiezen/gopdf/pdf"
func main() { pdf.New() }
✅ Works:
$ which go git hg
/usr/local/go/bin/go
/usr/local/bin/git
/usr/local/bin/hg
$ dep init -v
Getting direct dependencies...
Checked 1 directories for packages.
Found 1 direct dependencies.
Root project is "github.com/icio/dep-ensure-hang-repro"
 1 transitively valid internal packages
 1 external packages imported from 1 projects
(0)   ✓ select (root)
(1)	? attempt bitbucket.org/zombiezen/gopdf with 1 pkgs; 6 versions to try
(1)	    try bitbucket.org/zombiezen/gopdf@default
(1)	✓ select bitbucket.org/zombiezen/gopdf@default w/1 pkgs
  ✓ found solution with 1 packages from 1 projects
Solver wall times by segment:
     b-source-exists: 1.335016635s
         b-list-pkgs: 1.182683639s
     b-list-versions: 384.111313ms
              b-gmal: 131.479728ms
            new-atom:     77.721µs
             satisfy:     64.579µs
         select-root:     52.466µs
         select-atom:     44.911µs
               other:      8.337µs
  b-deduce-proj-root:      2.125µs
  TOTAL: 3.033541454s
  Using default as constraint for direct dep bitbucket.org/zombiezen/gopdf
  Locking in default (1c63dc6) for direct dep bitbucket.org/zombiezen/gopdf
(1/1) Wrote bitbucket.org/zombiezen/gopdf@default
$ rm -rf Gopkg.* vendor
$ mkdir bin; ln -s $(which git go dep) bin
$ tree .
.
├── bin
│   ├── dep -> /Users/icio/go/bin/dep
│   ├── git -> /usr/local/bin/git
│   └── go -> /usr/local/go/bin/go
└── main.go
$ PATH=$(realpath bin) dep init -v
Getting direct dependencies...
Checked 2 directories for packages.
Found 1 direct dependencies.
Root project is "github.com/icio/dep-ensure-hang-repro"
 1 transitively valid internal packages
 1 external packages imported from 1 projects
(0)   ✓ select (root)
    ... waits here indefinitely ...
^CSignal received: waiting for 1 ops to complete...
(1)	  ← no more versions of bitbucket.org/zombiezen/gopdf to try; begin backtrack
  ✗ solving failed
Solver wall times by segment:
     b-source-exists: 14.486804812s
               other:      73.474µs
         select-root:      43.564µs
            new-atom:       5.505µs
  b-deduce-proj-root:       2.323µs
  TOTAL: 14.486929678s
init failed: unable to solve the dependency graph: Solving failure: no valid source could be created:
	failed to set up sources from the following URLs:
https://bitbucket.org/zombiezen/gopdf
: hg is not installed:
	failed to set up sources from the following URLs:
ssh://hg@bitbucket.org/zombiezen/gopdf
: hg is not installed:
	failed to set up sources from the following URLs:
http://bitbucket.org/zombiezen/gopdf
: hg is not installed:
	failed to set up sources from the following URLs:
https://bitbucket.org/zombiezen/gopdf
: remote repository at https://bitbucket.org/zombiezen/gopdf does not exist, or is inaccessible: remote: Not Found
fatal: repository 'https://bitbucket.org/zombiezen/gopdf/' not found
: exit status 128
	failed to set up sources from the following URLs:
ssh://git@bitbucket.org/zombiezen/gopdf
: remote repository at ssh://git@bitbucket.org/zombiezen/gopdf does not exist, or is inaccessible: error: cannot run ssh: No such file or directory
fatal: unable to fork
: exit status 128
	failed to set up sources from the following URLs:
git://bitbucket.org/zombiezen/gopdf
: remote repository at git://bitbucket.org/zombiezen/gopdf does not exist, or is inaccessible: : signal: interrupt
	failed to set up sources from the following URLs:
http://bitbucket.org/zombiezen/gopdf
: context canceled
Not sure if relevant, but here's my git config:
$ git config --list | sort
alias.ignored=!git ls-files -v | grep ^[[:lower:]]
color.ui=auto
core.editor=vim
credential.helper=osxkeychain
diff.tool=Kaleidoscope
difftool.Kaleidoscope.cmd=ksdiff --partial-changeset --relative-path "$MERGED" -- "$LOCAL" "$REMOTE"
difftool.prompt=false
http.cookiefile=/Users/icio/.gitcookies
merge.tool=Kaleidoscope
mergetool.Kaleidoscope.cmd=ksdiff --merge --output "$MERGED" --base "$BASE" -- "$LOCAL" --snapshot "$REMOTE" --snapshot
mergetool.Kaleidoscope.trustexitcode=true
mergetool.prompt=false
pager.diff=diff-highlight | less
pager.log=diff-highlight | less
pager.show=diff-highlight | less
push.default=simple
ui.color=auto
url.git@github.com:.insteadof=https://github.com/
url.git@github.com:unravelin.insteadof=https://github.com/unravelin
user.email=paul...
user.name=Paul...
What did you expect to see?
dep init either error that hg was required but not installed; or succeed without it.
What did you see instead?
dep init hangs forever.
wking
Metadata
Metadata
Assignees
Labels
No labels