terra-farm / terraform-provider-virtualbox

VirtualBox provider for Terraform
https://terra-farm.github.io/provider-virtualbox/
MIT License
324 stars 136 forks source link

Git repos not meeting constraints during dep ensure #51

Closed williamwgilmore closed 5 years ago

williamwgilmore commented 5 years ago

Following the "How to build from source" steps, I can't seem to get dep ensure to work. First github.com/dustin/go-humanize is not allowed by constraints.

Gopkg.lock is out of sync with Gopkg.toml and project imports:
github.com/terra-farm/terraform-provider-virtualbox/virtualbox: imported or required, but missing from Gopkg.lock's input-imports

Root project is "terraform-provider-virtualbox"
 2 transitively valid internal packages
 9 external packages imported from 6 projects
(0)   ✓ select (root)
(1)     ? attempt github.com/dustin/go-humanize with 1 pkgs; at least 1 versions to try
(1)         try github.com/dustin/go-humanize@v1.0.0
(1)     ✗   unexpected error while defensively updating submodules: fatal: 'submodule' appears to be a git command, but we were not
(1)       able to execute it. Maybe git-submodule is broken?
(1)       : command failed: [git submodule update --init --recursive]: exit status 128
(1)         try github.com/dustin/go-humanize@master
(2)     ✗   github.com/dustin/go-humanize@master not allowed by constraint ^1.0.0:
(2)         ^1.0.0 from (root)
(1)       ← no more versions of github.com/dustin/go-humanize to try; begin backtrack
  ✗ solving failed

Solver wall times by segment:
         b-list-pkgs: 1.8030712s
     b-list-versions: 1.2778305s
     b-source-exists: 253.9108ms
             satisfy:   4.8661ms
         select-root:   2.9269ms
               other:   1.9501ms
            new-atom:      967µs
  b-deduce-proj-root:         0s

  TOTAL: 3.3455226s

Solving failure: No versions of github.com/dustin/go-humanize met constraints:
        v1.0.0: unexpected error while defensively updating submodules: fatal: 'submodule' appears to be a git command, but we were not
able to execute it. Maybe git-submodule is broken?
: command failed: [git submodule update --init --recursive]: exit status 128
        master: Could not introduce github.com/dustin/go-humanize@master, as it is not allowed by constraint ^1.0.0 from project terraform-provider-virtualbox.

I noticed that the lock and toml files were out of sync, so I deleted gopkg.lock, gopkg.toml, and go/pkg/dep/sources.

dep init -v:
Getting direct dependencies...
Checked 9 directories for packages.
Found 6 direct dependencies.
Root project is "terraform-provider-virtualbox"
 2 transitively valid internal packages
 9 external packages imported from 6 projects
(0)   ✓ select (root)
(1)     ? attempt github.com/pyToshka/go-virtualbox with 1 pkgs; 1 versions to try
(1)         try github.com/pyToshka/go-virtualbox@master
(1)     ✗   unexpected error while defensively updating submodules: fatal: 'submodule' appears to be a git command, but we were not
(1)       able to execute it. Maybe git-submodule is broken?
(1)       : command failed: [git submodule update --init --recursive]: exit status 128
(1)       ← no more versions of github.com/pyToshka/go-virtualbox to try; begin backtrack
  ✗ solving failed

Solver wall times by segment:
     b-list-versions: 9.2838633s
         b-list-pkgs: 1.9447826s
         select-root:   1.9484ms
            new-atom:    976.7µs
               other:    976.5µs
     b-source-exists:         0s
             satisfy:         0s
  b-deduce-proj-root:         0s

  TOTAL: 11.2325475s

init failed: unable to solve the dependency graph: Solving failure: No versions of github.com/pyToshka/go-virtualbox met constraints:
        master: unexpected error while defensively updating submodules: fatal: 'submodule' appears to be a git command, but we were not
able to execute it. Maybe git-submodule is broken?
: command failed: [git submodule update --init --recursive]: exit status 128

And then github.com/pyToshka/go-virtualbox would not meet constraints. I'm not sure if this is a problem with the repos or my local set up, but I'd appreciate any insight.

VoyTechnology commented 5 years ago

We are somewhat in the process of switching from dep to go modules. I might have messed up some dependency. Try with go mod (if possible), and see will that help. If it doesn't, I'll take a look

williamwgilmore commented 5 years ago

go mod verify completed successfully, I'll close this as resolved. Good luck with the update!