Skip to content
This repository has been archived by the owner on Sep 9, 2020. It is now read-only.

Missing .gitmodules by vendor #1296

Closed
razorness opened this issue Oct 23, 2017 · 1 comment
Closed

Missing .gitmodules by vendor #1296

razorness opened this issue Oct 23, 2017 · 1 comment

Comments

@razorness
Copy link

What version of dep are you using (dep version)?

go: go1.9.1 linux/amd64
dep: v0.3.2-4-g7b5c43aa
git: 2.14.2

What dep command did you run?

# dep ensure -v
Root project is "github.com/my/repo"
 8 transitively valid internal packages
 23 external packages imported from 16 projects
(0)   ✓ select (root)
...
(4)     ? attempt github.com/NYTimes/logrotate with 1 pkgs; at least 1 versions to try
(4)         try github.com/NYTimes/logrotate@master
(4)     ✓ select github.com/NYTimes/logrotate@master w/1 pkgs
(5)     ? attempt github.com/aymerick/raymond with 1 pkgs; at least 1 versions to try
(5)         try github.com/aymerick/[email protected]
(5)     ✓ select github.com/aymerick/[email protected] w/4 pkgs
(6)     ? attempt github.com/adam-hanna/sessions with 5 pkgs; at least 1 versions to try
(6)         try github.com/adam-hanna/[email protected]
(6)     ✗   unexpected error while defensively updating submodules: : command failed: [git submodule update --init --recursive]: exit status 128
(6)         try github.com/adam-hanna/[email protected]
(7)     ✗   github.com/adam-hanna/[email protected] not allowed by constraint ^0.0.2:
(7)         ^0.0.2 from (root)
(6)         try github.com/adam-hanna/sessions@master
(7)     ✗   github.com/adam-hanna/sessions@master not allowed by constraint ^0.0.2:
(7)         ^0.0.2 from (root)
(6)         try github.com/adam-hanna/sessions@develop
(7)     ✗   github.com/adam-hanna/sessions@develop not allowed by constraint ^0.0.2:
(7)         ^0.0.2 from (root)
(6)       ← no more versions of github.com/adam-hanna/sessions to try; begin backtrack
(5)     ← backtrack: no more versions of github.com/aymerick/raymond to try
(4)     ← backtrack: no more versions of github.com/NYTimes/logrotate to try
...
  ✗ solving failed

Solver wall times by segment:
     b-source-exists: 3.913478065s
         b-list-pkgs: 1.286524935s
              b-gmal: 218.790765ms
             satisfy:   1.505631ms
            new-atom:   1.238137ms
           backtrack:   1.062701ms
         select-root:    909.949µs
         select-atom:     643.78µs
            unselect:    335.459µs
  b-deduce-proj-root:     89.125µs
          b-pair-rev:     85.236µs
     b-list-versions:     23.727µs
           b-matches:     15.354µs
               other:      9.864µs

  TOTAL: 5.424712728s

ensure Solve(): No versions of github.com/adam-hanna/sessions met constraints:
        v0.0.2: unexpected error while defensively updating submodules: : command failed: [git submodule update --init --recursive]: exit status 128
        v0.0.1: Could not introduce github.com/adam-hanna/[email protected], as it is not allowed by constraint ^0.0.2 from project github.com/my/repo.
        master: Could not introduce github.com/adam-hanna/sessions@master, as it is not allowed by constraint ^0.0.2 from project github.com/my/repo.
        develop: Could not introduce github.com/adam-hanna/sessions@develop, as it is not allowed by constraint ^0.0.2 from project github.com/my/repo.

What did you expect to see?

While dep ensure works on Windows, it fails on Linux Debian 8/9.

Windows version:
Windows 10 x64 Pro Version 1709 (Build 16299.19)
go: go1.9.1 windows/amd64
dep: v0.3.2-4-g7b5c43aa

Also glide is working with this package.

For me, this issue seems to be related to the package. I also created an issue on its side (adam-hanna/sessions#5). This track is more for information. I also wonder why it does not fail under windows. git submodule update seems not to be triggered under Windows while git also exits with same error when you try it manually.

What did you see instead?

The reason is missing .gitmodules in https://github.com/adam-hanna/sessions.
After cloning https://github.com/adam-hanna/sessions by hand and executing git submodule update --init --recursive you get:

# git submodule update --init --recursive
fatal: No url found for submodule path 'vendor/github.com/pborman/uuid' in .gitmodules
# echo $?
128
@sdboyer
Copy link
Member

sdboyer commented Oct 24, 2017

hi! sorry you ran into this.

hmm...weird that it doesn't fail under windows, but i think that probably tells us something useful about our git behaviors on windows.

as for the broken submodule, there really isn't much we can do about that, unfortunately. it's essentially a malformed git repository - they need to fix it. some relevant discussion in Masterminds/glide#920. in the meantime, the easiest recourse for you will probably be just to fork that project.

though...we COULD at least pass the damn error through. getting errors to surface from git correctly has been the bane of my existence for months. /cc @jmank88

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants