New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dep ensure: ensure Solve(): No versions of github.com/kjk/siser met constraints #699

Closed
kjk opened this Issue Jun 1, 2017 · 7 comments

Comments

Projects
None yet
5 participants
@kjk

kjk commented Jun 1, 2017

A repro (on mac, go 1.8.3) using latest (1c168c0) version of dep:

git checkout https://github.com/kjk/web-blog.git
dep ensure

I get an error:

ensure Solve(): No versions of github.com/kjk/siser met constraints:
	master: Unable to update checked out version: fatal: reference is not a tree: 593a1a6c12ef4c7c33581fbde55a0ce6b85e124d

Notice that this revision exists: kjk/siser@593a1a6

It fails on other packages as well:

ensure Solve(): No versions of golang.org/x/crypto met constraints:
	master: Unable to update checked out version: fatal: reference is not a tree: 080743b21912ae11ad9222778a048b795a5aae00

but most frequently github.com/kjk/siser

Dependency file was created with dep ensure -u on a different machine (but also mac).

From a bit of googling it seems this is what git returns, but I don't know what command exactly.

Running verbose:

$ dep ensure -v
Root project is "github.com/kjk/blog"
 1 transitively valid internal packages
 13 external packages imported from 13 projects
(0)   ✓ select (root)
(1)	? attempt github.com/SparkPost/gosparkpost with 1 pkgs; at least 1 versions to try
(1)	    try github.com/SparkPost/gosparkpost@master
(1)	✓ select github.com/SparkPost/gosparkpost@master w/2 pkgs
(2)	? attempt github.com/dustin/go-humanize with 1 pkgs; at least 1 versions to try
(2)	    try github.com/dustin/go-humanize@master
(2)	✓ select github.com/dustin/go-humanize@master w/1 pkgs
(3)	? attempt github.com/kjk/dailyrotate with 1 pkgs; at least 1 versions to try
(3)	    try github.com/kjk/dailyrotate@master
(3)	✓ select github.com/kjk/dailyrotate@master w/1 pkgs
(4)	? attempt github.com/go-fsnotify/fsnotify with 1 pkgs; at least 1 versions to try
(4)	    try github.com/go-fsnotify/fsnotify@master
(4)	✓ select github.com/go-fsnotify/fsnotify@master w/1 pkgs
(5)	? attempt github.com/kr/fs with 1 pkgs; at least 1 versions to try
(5)	    try github.com/kr/fs@master
(5)	✓ select github.com/kr/fs@master w/1 pkgs
(6)	? attempt github.com/microcosm-cc/bluemonday with 1 pkgs; at least 1 versions to try
(6)	    try github.com/microcosm-cc/bluemonday@master
(6)	✓ select github.com/microcosm-cc/bluemonday@master w/1 pkgs
(7)	? attempt github.com/pkg/errors with 1 pkgs; at least 1 versions to try
(7)	    try github.com/pkg/errors@v0.8.0
(7)	✓ select github.com/pkg/errors@v0.8.0 w/1 pkgs
(8)	? attempt github.com/kjk/siser with 1 pkgs; at least 1 versions to try
(8)	    try github.com/kjk/siser@master
(8)	✗   Unable to update checked out version: fatal: reference is not a tree: 593a1a6c12ef4c7c33581fbde55a0ce6b85e124d
(8)	    try github.com/kjk/siser@master
(8)	✗   Unable to update checked out version: fatal: reference is not a tree: 593a1a6c12ef4c7c33581fbde55a0ce6b85e124d
(8)	  ← no more versions of github.com/kjk/siser to try; begin backtrack
(7)	← backtrack: no more versions of github.com/pkg/errors to try
(6)	← backtrack: no more versions of github.com/microcosm-cc/bluemonday to try
(5)	← backtrack: no more versions of github.com/kr/fs to try
(4)	← backtrack: no more versions of github.com/go-fsnotify/fsnotify to try
(3)	← backtrack: no more versions of github.com/kjk/dailyrotate to try
(2)	← backtrack: no more versions of github.com/dustin/go-humanize to try
(1)	← backtrack: no more versions of github.com/SparkPost/gosparkpost to try
  ✗ solving failed

Solver wall times by segment:
     b-source-exists: 1.786681846s
         b-list-pkgs: 973.319787ms
              b-gmal: 937.044693ms
  b-deduce-proj-root:  231.61719ms
         select-atom:    540.846µs
             satisfy:    531.758µs
            new-atom:    481.376µs
         select-root:    323.196µs
            unselect:    309.772µs
           backtrack:      26.02µs
     b-list-versions:     11.989µs
               other:     10.288µs

  TOTAL: 3.930898761s

ensure Solve(): No versions of github.com/kjk/siser met constraints:
	master: Unable to update checked out version: fatal: reference is not a tree: 593a1a6c12ef4c7c33581fbde55a0ce6b85e124d

	master: Unable to update checked out version: fatal: reference is not a tree: 593a1a6c12ef4c7c33581fbde55a0ce6b85e124d

An aside: it would be good to have "even more verbose" cmd-line arg that prints external commands that dep executes.

Also, can it be flakiness on the github side?

@sdboyer

This comment has been minimized.

Show comment
Hide comment
@sdboyer

sdboyer Jun 1, 2017

Member

Thanks for the detailed issue! This is the same stale cache issue as #639 rearing its head again. #696 fixes it - I'll probably merge tomorrow morning.

An aside: it would be good to have "even more verbose" cmd-line arg that prints external commands that dep executes.

This has come up as a request a couple times, but it's hard to do. For one, command output wouldn't necessarily be well-ordered with respect to the trace output you see above, as we may end up pre-caching a bunch of this stuff. Two is caching itself - we actually want to avoid running these commands as much as possible, so in our ideal world, very little output would be generated. Third is more of an architectural choice, but the system that actually does the VCS work is pretty well sealed-up in a way that it can't directly log.

It's possible we could include more things as warnings, a la #534. Or maybe we "log" internally and store up all the messages, then make them available after solving is done. But interleaving more output with the trace output above would be pretty harmful to coherency of the trace output.

Fortunately, this case has a solution at hand 😄

Member

sdboyer commented Jun 1, 2017

Thanks for the detailed issue! This is the same stale cache issue as #639 rearing its head again. #696 fixes it - I'll probably merge tomorrow morning.

An aside: it would be good to have "even more verbose" cmd-line arg that prints external commands that dep executes.

This has come up as a request a couple times, but it's hard to do. For one, command output wouldn't necessarily be well-ordered with respect to the trace output you see above, as we may end up pre-caching a bunch of this stuff. Two is caching itself - we actually want to avoid running these commands as much as possible, so in our ideal world, very little output would be generated. Third is more of an architectural choice, but the system that actually does the VCS work is pretty well sealed-up in a way that it can't directly log.

It's possible we could include more things as warnings, a la #534. Or maybe we "log" internally and store up all the messages, then make them available after solving is done. But interleaving more output with the trace output above would be pretty harmful to coherency of the trace output.

Fortunately, this case has a solution at hand 😄

@kjk

This comment has been minimized.

Show comment
Hide comment
@kjk

kjk Jun 1, 2017

Thanks, deleting $GOPATH/pkg/dep/sources fixed the issue.

kjk commented Jun 1, 2017

Thanks, deleting $GOPATH/pkg/dep/sources fixed the issue.

@sdboyer sdboyer closed this in #696 Jun 1, 2017

@localvar

This comment has been minimized.

Show comment
Hide comment
@localvar

localvar Aug 11, 2017

I met this issue in:

dep v0.3.0
git v1.8.3
CentOS v7.2

resolved after upgrade git to latest version

localvar commented Aug 11, 2017

I met this issue in:

dep v0.3.0
git v1.8.3
CentOS v7.2

resolved after upgrade git to latest version

@sdboyer

This comment has been minimized.

Show comment
Hide comment
@sdboyer

sdboyer Aug 11, 2017

Member

@localvar hi! could you post a new, full issue describing what you encountered? even if you saw the same error message, the underlying logic that gave rise to this issue are now different, and require a different analysis. (especially because it's not evident to me how updating git would change this)

Member

sdboyer commented Aug 11, 2017

@localvar hi! could you post a new, full issue describing what you encountered? even if you saw the same error message, the underlying logic that gave rise to this issue are now different, and require a different analysis. (especially because it's not evident to me how updating git would change this)

@localvar

This comment has been minimized.

Show comment
Hide comment
@localvar

localvar Aug 14, 2017

@sdboyer , I cannot reproduce it now, but this did happen on two of my servers, I will log detailed information if I meet it again.

localvar commented Aug 14, 2017

@sdboyer , I cannot reproduce it now, but this did happen on two of my servers, I will log detailed information if I meet it again.

@E4ck

This comment has been minimized.

Show comment
Hide comment
@E4ck

E4ck Jun 28, 2018

deleting $GOPATH/pkg/dep/sources,but still did not solve the problem

E4ck commented Jun 28, 2018

deleting $GOPATH/pkg/dep/sources,but still did not solve the problem

@yogesh-desai

This comment has been minimized.

Show comment
Hide comment
@yogesh-desai

yogesh-desai Oct 12, 2018

I also faced the same issue after updating golang to version 1.11

dep:
 version     : v0.5.0
 build date  : 2018-07-26
 git hash    : 224a564
 go version  : go1.10.3
 go compiler : gc
 platform    : darwin/amd64
 features    : ImportDuringSolve=false

Deleting $GOPATH/pkg/dep/sources solved my issue.

yogesh-desai commented Oct 12, 2018

I also faced the same issue after updating golang to version 1.11

dep:
 version     : v0.5.0
 build date  : 2018-07-26
 git hash    : 224a564
 go version  : go1.10.3
 go compiler : gc
 platform    : darwin/amd64
 features    : ImportDuringSolve=false

Deleting $GOPATH/pkg/dep/sources solved my issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment