0

I'm not very familiar with go dep (nor golang in general) but I inherited a project in which I need to add a dependency. When running dep ensure -v I get the following output:

Root project is "github.com/MyOrg/myProject"
 7 transitively valid internal packages
 8 external packages imported from 8 projects
(0)   ✓ select (root)
(1) ? attempt github.com/MyOrg/proto with 1 pkgs; at least 1 versions to try
(1)     try github.com/MyOrg/proto@v0.5.0
(1) ✓ select github.com/MyOrg/proto@v0.5.0 w/1 pkgs
(2) ? attempt github.com/golang/protobuf with 1 pkgs; at least 1 versions to try
(2)     try github.com/golang/protobuf@v1.0.0
(2) ✓ select github.com/golang/protobuf@v1.0.0 w/5 pkgs
(3) ? attempt github.com/gogap/logrus_mate with 1 pkgs; at least 1 versions to try
(3)     try github.com/gogap/logrus_mate@master
(3) ✓ select github.com/gogap/logrus_mate@master w/1 pkgs
(4) ? attempt github.com/sirupsen/logrus with 1 pkgs; at least 1 versions to try
(4)     try github.com/sirupsen/logrus@f4ee69125072b22721efbe639bd0da9c9d19b8cc
(4) ✓ select github.com/sirupsen/logrus@f4ee69125072b22721efbe639bd0da9c9d19b8cc w/1 pkgs
(5) ? revisit github.com/golang/protobuf to add 6 pkgs
(5)   ✓ include 6 more pkgs from github.com/golang/protobuf@v1.0.0
(6)   ← no more versions of golang.org/x/crypto to try; begin backtrack
(5) ← backtrack: popped 6 pkgs from github.com/golang/protobuf
(4) ← backtrack: no more versions of github.com/sirupsen/logrus to try
(3) ← backtrack: no more versions of github.com/gogap/logrus_mate to try
(2) ← backtrack: no more versions of github.com/golang/protobuf to try
(1) ← backtrack: no more versions of github.com/MyOrg/proto to try
  ✗ solving failed

Solver wall times by segment:
     b-source-exists: 9.026066635s
  b-deduce-proj-root: 542.618581ms
         b-list-pkgs: 145.641921ms
              b-gmal: 100.702298ms
             satisfy:   1.205187ms
         select-atom:   1.159204ms
            unselect:   1.110058ms
            new-atom:    179.985µs
         select-root:    139.444µs
           backtrack:     43.169µs
               other:     30.441µs
            add-atom:      5.475µs

  TOTAL: 9.818902398s

Solving failure: exit status 128

I am suspecting the problem is in the line:

(6)   ← no more versions of golang.org/x/crypto to try; begin backtrack

but does that indicate a dependency problem in the github.com/golang/protobuf package?

Can someone explain what the actual problem is and what are possible solutions?

Zack
  • 540
  • 5
  • 12

1 Answers1

1

golang.org/x/crypto has multiple packages inside. So you should be having the right package in dependency specified (for example, golang.org/x/crypto/ssh) or the entire package tree by golang.org/x/crypto/...

Jay
  • 1,980
  • 1
  • 13
  • 23