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

dep doesn't check git remote for new version #719

@kjk

Description

@kjk

This is on latest mac, using latest dep 6b75d6b

Here's what happened:

$ 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/gorilla/websocket with 1 pkgs; at least 1 versions to try
(3)	    try github.com/gorilla/websocket@master
(3)	✓ select github.com/gorilla/websocket@master w/1 pkgs
(4)	? attempt github.com/kjk/siser with 1 pkgs; at least 1 versions to try
(4)	    try github.com/kjk/siser@master
(4)	✓ select github.com/kjk/siser@master w/1 pkgs
(5)	? attempt github.com/go-fsnotify/fsnotify with 1 pkgs; at least 1 versions to try
(5)	    try github.com/go-fsnotify/fsnotify@master
(5)	✓ select github.com/go-fsnotify/fsnotify@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/kjk/dailyrotate with 1 pkgs; at least 1 versions to try
(7)	    try github.com/kjk/dailyrotate@master
(7)	✓ select github.com/kjk/dailyrotate@master w/1 pkgs
(8)	? attempt github.com/kurin/blazer with 1 pkgs; at least 1 versions to try
(8)	    try github.com/kurin/blazer@master
(8)	✓ select github.com/kurin/blazer@master w/4 pkgs
(9)	? attempt github.com/thomas11/atomgenerator with 1 pkgs; at least 1 versions to try
(9)	    try github.com/thomas11/atomgenerator@master
(9)	✓ select github.com/thomas11/atomgenerator@master w/1 pkgs
(10)  ? attempt github.com/kr/fs with 1 pkgs; at least 1 versions to try
(10)      try github.com/kr/fs@master
(10)  ✓ select github.com/kr/fs@master w/1 pkgs
(11)  ? attempt github.com/kjk/u with 1 pkgs; at least 1 versions to try
(11)      try github.com/kjk/u@master
(11)  ✓ select github.com/kjk/u@master w/1 pkgs
(12)  ? attempt github.com/russross/blackfriday with 1 pkgs; at least 1 versions to try
(12)      try github.com/russross/blackfriday@master
(12)  ✓ select github.com/russross/blackfriday@master w/1 pkgs
(13)  ? attempt golang.org/x/crypto with 1 pkgs; at least 1 versions to try
(13)      try golang.org/x/crypto@master
(13)  ✗   Unable to update checked out version: fatal: reference is not a tree: e1a4589e7d3ea14a3352255d04b6f1a418845e5e
(13)      try golang.org/x/crypto@master
(13)  ✗   Unable to update checked out version: fatal: reference is not a tree: e1a4589e7d3ea14a3352255d04b6f1a418845e5e
(13)    ← no more versions of golang.org/x/crypto to try; begin backtrack
(12)  ← backtrack: no more versions of github.com/russross/blackfriday to try
(11)  ← backtrack: no more versions of github.com/kjk/u to try
(10)  ← backtrack: no more versions of github.com/kr/fs to try
(9)	← backtrack: no more versions of github.com/thomas11/atomgenerator to try
(8)	← backtrack: no more versions of github.com/kurin/blazer to try
(7)	← backtrack: no more versions of github.com/kjk/dailyrotate to try
(6)	← backtrack: no more versions of github.com/microcosm-cc/bluemonday to try
(5)	← backtrack: no more versions of github.com/go-fsnotify/fsnotify to try
(4)	← backtrack: no more versions of github.com/kjk/siser to try
(3)	← backtrack: no more versions of github.com/gorilla/websocket 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: 4.631438607s
         b-list-pkgs: 3.677590715s
              b-gmal:  3.49158557s
  b-deduce-proj-root: 534.542581ms
         select-atom:   1.624344ms
            new-atom:   1.149836ms
             satisfy:     946.35µs
            unselect:    537.982µs
         select-root:    498.242µs
     b-list-versions:    160.935µs
           backtrack:     66.515µs
               other:     15.533µs

  TOTAL: 12.34015721s

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

Notice that golang/crypto@e1a4589 does exist.

I fixed it by doing:

$ go get ./...
$ dep ensure

After updating local copy of all dependencies to latest version, dep ensure works.

I assume that's because dep only checked a local version of github.com/golang/crypto in $GOPATH, which was not up-to-date, but didn't check the remote.

I got into that state because I regularly work on 2 different machines.

I did dep ensure -update on one machine, which stamped the latest version of golang.org/x/crypto.

I did git pull on the second machine and tried dep ensure, which failed due to outdated local copy (I think).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions