tools / godep

dependency tool for go
http://godoc.org/github.com/tools/godep
BSD 3-Clause "New" or "Revised" License
5.54k stars 454 forks source link

godep restore can not get specified version in Godep.json #296

Closed qinguoan closed 8 years ago

qinguoan commented 8 years ago

Hi,

I got a problem with godep restore. I only can get the last version of libs after I run godep restore.

I download a project from github.com which project got a Godep dir in it, I run godep restore then the problem(godep restore can not get specified version is Godep.json) happened.

Could some one help me? many thanks!!!!

My system: osx 10.10.5. godep version: v18(last version)

freeformz commented 8 years ago

Can you include the copy of the error and your Godeps.json file?

qinguoan commented 8 years ago

Hi freeformz ,

Thanks for your fast reply. I just clone the kubernetes project. My Godep.json below:

{
"ImportPath": "vulcan/kubernetes",
"GoVersion": "go1.4.2",
"Packages": [
"./..."
],
"Deps": [
{
"ImportPath": "bitbucket.org/ww/goautoneg",
"Comment": "null-5",
"Rev": "75cd24fc2f2c2a2088577d12123ddee5f54e0675"
},
{
"ImportPath": "code.google.com/p/gcfg",
"Rev": "c2d3050044d05357eaf6c3547249ba57c5e235cb"
},
{
"ImportPath": "code.google.com/p/go-uuid/uuid",
"Comment": "null-12",
"Rev": "7dda39b2e7d5e265014674c5af696ba4186679e9"
},
{
"ImportPath": "code.google.com/p/google-api-go-client/compute/v1",
"Comment": "release-96",
"Rev": "98c78185197025f935947caac56a7b6d022f89d2"
},
{
"ImportPath": "code.google.com/p/google-api-go-client/container/v1beta1",
"Comment": "release-105",
"Rev": "98c78185197025f935947caac56a7b6d022f89d2"
},
{
"ImportPath": "code.google.com/p/google-api-go-client/googleapi",
"Comment": "release-96",
"Rev": "98c78185197025f935947caac56a7b6d022f89d2"
},
{
"ImportPath": "github.com/Sirupsen/logrus",
"Comment": "v0.6.2-10-g51fe59a",
"Rev": "51fe59aca108dc5680109e7b2051cbdcfa5a253c"
},
{
"ImportPath": "github.com/abbot/go-http-auth",
"Rev": "c0ef4539dfab4d21c8ef20ba2924f9fc6f186d35"
},
{
"ImportPath": "github.com/appc/spec/schema",
"Comment": "v0.5.1-55-g87808a3",
"Rev": "87808a37061a4a2e6204ccea5fd2fc930576db94"
},
{
"ImportPath": "github.com/aws/aws-sdk-go/aws",
"Comment": "v0.6.0-7-gcea3a42",
"Rev": "cea3a425fc2d887d102e406ec2f8b37a57abd82f"
},
{
"ImportPath": "github.com/aws/aws-sdk-go/internal/apierr",
"Comment": "v0.6.0-7-gcea3a42",
"Rev": "cea3a425fc2d887d102e406ec2f8b37a57abd82f" }, { "ImportPath": "github.com/aws/aws-sdk-go/internal/endpoints", "Comment": "v0.6.0-7-gcea3a42", "Rev": "cea3a425fc2d887d102e406ec2f8b37a57abd82f" }, { "ImportPath": "github.com/aws/aws-sdk-go/internal/protocol/ec2query", "Comment": "v0.6.0-7-gcea3a42", "Rev": "cea3a425fc2d887d102e406ec2f8b37a57abd82f" }, { "ImportPath": "github.com/aws/aws-sdk-go/internal/protocol/query", "Comment": "v0.6.0-7-gcea3a42", "Rev": "cea3a425fc2d887d102e406ec2f8b37a57abd82f" }, { "ImportPath": "github.com/aws/aws-sdk-go/internal/protocol/rest", "Comment": "v0.6.0-7-gcea3a42", "Rev": "cea3a425fc2d887d102e406ec2f8b37a57abd82f" }, { "ImportPath": "github.com/aws/aws-sdk-go/internal/protocol/xml/xmlutil", "Comment": "v0.6.0-7-gcea3a42", "Rev": "cea3a425fc2d887d102e406ec2f8b37a57abd82f" }, { "ImportPath": "github.com/aws/aws-sdk-go/internal/signer/v4", "Comment": "v0.6.0-7-gcea3a42", "Rev": "cea3a425fc2d887d102e406ec2f8b37a57abd82f" }, { "ImportPath": "github.com/aws/aws-sdk-go/service/autoscaling", "Comment": "v0.6.0-7-gcea3a42", "Rev": "cea3a425fc2d887d102e406ec2f8b37a57abd82f" }, { "ImportPath": "github.com/aws/aws-sdk-go/service/ec2", "Comment": "v0.6.0-7-gcea3a42", "Rev": "cea3a425fc2d887d102e406ec2f8b37a57abd82f" }, { "ImportPath": "github.com/aws/aws-sdk-go/service/elb", "Comment": "v0.6.0-7-gcea3a42", "Rev": "cea3a425fc2d887d102e406ec2f8b37a57abd82f" }, { "ImportPath": "github.com/beorn7/perks/quantile", "Rev": "b965b613227fddccbfffe13eae360ed3fa822f8d" }, { "ImportPath": "github.com/codegangsta/negroni", "Comment": "v0.1-62-g8d75e11", "Rev": "8d75e11374a1928608c906fe745b538483e7aeb2" }, { "ImportPath": "github.com/coreos/go-etcd/etcd", "Rev": "2038b5942e8e7f4f244729ff9353afab8ba11afc" }, { "ImportPath": "github.com/coreos/go-semver/semver", "Rev": "6fe83ccda8fb9b7549c9ab4ba47f47858bc950aa" }, { "ImportPath": "github.com/coreos/go-systemd/daemon", "Comment": "v2-27-g97e243d", "Rev": "97e243d21a8e232e9d8af38ba2366dfcfceebeba" }, { "ImportPath": "github.com/coreos/go-systemd/dbus", "Comment": "v2-27-g97e243d", "Rev": "97e243d21a8e232e9d8af38ba2366dfcfceebeba" }, { "ImportPath": "github.com/coreos/go-systemd/unit", "Comment": "v2-27-g97e243d", "Rev": "97e243d21a8e232e9d8af38ba2366dfcfceebeba" }, { "ImportPath": "github.com/cpuguy83/go-md2man", "Comment": "v1.0.2-5-g2831f11", "Rev": "2831f11f66ff4008f10e2cd7ed9a85e3d3fc2bed" }, { "ImportPath": "github.com/davecgh/go-spew/spew", "Rev": "3e6e67c4dcea3ac2f25fd4731abc0e1deaf36216" }, { "ImportPath": "github.com/daviddengcn/go-colortext", "Rev": "b5c0891944c2f150ccc9d02aecf51b76c14c2948" }, { "ImportPath": "github.com/dgrijalva/jwt-go", "Comment": "v2.2.0-23-g5ca8014", "Rev": "5ca80149b9d3f8b863af0e2bb6742e608603bd99" }, { "ImportPath": "github.com/docker/docker/pkg/jsonmessage", "Comment": "v1.4.1-4045-g2b27fe1", "Rev": "2b27fe17a1b3fb8472fde96d768fa70996adf201" }, { "ImportPath": "github.com/docker/docker/pkg/mount", "Comment": "v1.4.1-4045-g2b27fe1", "Rev": "2b27fe17a1b3fb8472fde96d768fa70996adf201" }, { "ImportPath": "github.com/docker/docker/pkg/parsers", "Comment": "v1.4.1-4045-g2b27fe1", "Rev": "2b27fe17a1b3fb8472fde96d768fa70996adf201" }, { "ImportPath": "github.com/docker/docker/pkg/term", "Comment": "v1.4.1-4045-g2b27fe1", "Rev": "2b27fe17a1b3fb8472fde96d768fa70996adf201" }, { "ImportPath": "github.com/docker/docker/pkg/timeutils", "Comment": "v1.4.1-4045-g2b27fe1", "Rev": "2b27fe17a1b3fb8472fde96d768fa70996adf201" }, { "ImportPath": "github.com/docker/docker/pkg/units", "Comment": "v1.4.1-4045-g2b27fe1", "Rev": "2b27fe17a1b3fb8472fde96d768fa70996adf201" }, { "ImportPath": "github.com/docker/libcontainer", "Comment": "v1.4.0-446-gae812bd", "Rev": "ae812bdca78084dc322037225d170e1883521d87" }, { "ImportPath": "github.com/docker/spdystream", "Rev": "83ae67e694a4ab5cbaee4d3126f25118712b26e6" }, { "ImportPath": "github.com/elazarl/go-bindata-assetfs", "Rev": "ae4665cf2d188c65764c73fe4af5378acc549510" }, { "ImportPath": "github.com/emicklei/go-restful", "Comment": "v1.1.3-54-gbdfb7d4", "Rev": "bdfb7d41639a84ea7c36df648e5865cd9fbf21e2" }, { "ImportPath": "github.com/evanphx/json-patch", "Rev": "7dd4489c2eb6073e5a9d7746c3274c5b5f0387df" }, { "ImportPath": "github.com/fsouza/go-dockerclient", "Comment": "0.2.1-532-g2f1ad24", "Rev": "2f1ad24900b2777139b5becee93eb63a75b00617" }, { "ImportPath": "github.com/garyburd/redigo/internal", "Rev": "535138d7bcd717d6531c701ef5933d98b1866257" }, { "ImportPath": "github.com/garyburd/redigo/redis", "Rev": "535138d7bcd717d6531c701ef5933d98b1866257" }, { "ImportPath": "github.com/ghodss/yaml", "Rev": "588cb435e59ee8b6c2795482887755841ad67207" }, { "ImportPath": "github.com/godbus/dbus", "Comment": "0-7-g939230d", "Rev": "939230d2086a4f1870e04c52e0a376c25bae0ec4" }, { "ImportPath": "github.com/gogo/protobuf/proto", "Rev": "ab6cea4a44ef42b748cd88d2d372047b75806e0c" }, { "ImportPath": "github.com/golang/glog", "Rev": "44145f04b68cf362d9c4df2182967c2275eaefed" }, { "ImportPath": "github.com/golang/groupcache/lru", "Rev": "604ed5785183e59ae2789449d89e73f3a2a77987" }, { "ImportPath": "github.com/golang/protobuf/proto", "Rev": "7f07925444bb51fa4cf9dfe6f7661876f8852275" }, { "ImportPath": "github.com/google/cadvisor/api", "Comment": "0.15.1", "Rev": "ec588def40e1bb59f28f5a293b279f6762d13d44" }, { "ImportPath": "github.com/google/cadvisor/cache/memory", "Comment": "0.15.1", "Rev": "ec588def40e1bb59f28f5a293b279f6762d13d44" }, { "ImportPath": "github.com/google/cadvisor/collector", "Comment": "0.15.1", "Rev": "ec588def40e1bb59f28f5a293b279f6762d13d44" }, { "ImportPath": "github.com/google/cadvisor/container", "Comment": "0.15.1", "Rev": "ec588def40e1bb59f28f5a293b279f6762d13d44" }, { "ImportPath": "github.com/google/cadvisor/events", "Comment": "0.15.1", "Rev": "ec588def40e1bb59f28f5a293b279f6762d13d44" }, { "ImportPath": "github.com/google/cadvisor/fs", "Comment": "0.15.1", "Rev": "ec588def40e1bb59f28f5a293b279f6762d13d44" }, { "ImportPath": "github.com/google/cadvisor/healthz", "Comment": "0.15.1", "Rev": "ec588def40e1bb59f28f5a293b279f6762d13d44" }, { "ImportPath": "github.com/google/cadvisor/http", "Comment": "0.15.1", "Rev": "ec588def40e1bb59f28f5a293b279f6762d13d44" }, { "ImportPath": "github.com/google/cadvisor/info/v1", "Comment": "0.15.1", "Rev": "ec588def40e1bb59f28f5a293b279f6762d13d44" }, { "ImportPath": "github.com/google/cadvisor/info/v2", "Comment": "0.15.1", "Rev": "ec588def40e1bb59f28f5a293b279f6762d13d44" }, { "ImportPath": "github.com/google/cadvisor/manager", "Comment": "0.15.1", "Rev": "ec588def40e1bb59f28f5a293b279f6762d13d44" }, { "ImportPath": "github.com/google/cadvisor/metrics", "Comment": "0.15.1", "Rev": "ec588def40e1bb59f28f5a293b279f6762d13d44" }, { "ImportPath": "github.com/google/cadvisor/pages", "Comment": "0.15.1", "Rev": "ec588def40e1bb59f28f5a293b279f6762d13d44" }, { "ImportPath": "github.com/google/cadvisor/storage", "Comment": "0.15.1", "Rev": "ec588def40e1bb59f28f5a293b279f6762d13d44" }, { "ImportPath": "github.com/google/cadvisor/summary", "Comment": "0.15.1", "Rev": "ec588def40e1bb59f28f5a293b279f6762d13d44" }, { "ImportPath": "github.com/google/cadvisor/utils", "Comment": "0.15.1", "Rev": "ec588def40e1bb59f28f5a293b279f6762d13d44" }, { "ImportPath": "github.com/google/cadvisor/validate", "Comment": "0.15.1", "Rev": "ec588def40e1bb59f28f5a293b279f6762d13d44" }, { "ImportPath": "github.com/google/cadvisor/version", "Comment": "0.15.1", "Rev": "ec588def40e1bb59f28f5a293b279f6762d13d44" }, { "ImportPath": "github.com/google/go-github/github", "Rev": "930e6fdb8dc2b11458fdeb55b3cd68e5370a1a28" }, { "ImportPath": "github.com/google/go-querystring/query", "Rev": "547ef5ac979778feb2f760cdb5f4eae1a2207b86" }, { "ImportPath": "github.com/google/gofuzz", "Rev": "bbcb9da2d746f8bdbd6a936686a0a6067ada0ec5" }, { "ImportPath": "github.com/gorilla/context", "Rev": "215affda49addc4c8ef7e2534915df2c8c35c6cd" }, { "ImportPath": "github.com/gorilla/mux", "Rev": "8096f47503459bcc74d1f4c487b7e6e42e5746b5" }, { "ImportPath": "github.com/imdario/mergo", "Comment": "0.1.3-8-g6633656", "Rev": "6633656539c1639d9d78127b7d47c622b5d7b6dc" }, { "ImportPath": "github.com/inconshreveable/mousetrap", "Rev": "76626ae9c91c4f2a10f34cad8ce83ea42c93bb75" }, { "ImportPath": "github.com/influxdb/influxdb/client", "Comment": "v0.8.8", "Rev": "afde71eb1740fd763ab9450e1f700ba0e53c36d0" }, { "ImportPath": "github.com/juju/ratelimit", "Rev": "772f5c38e468398c4511514f4f6aa9a4185bc0a0" }, { "ImportPath": "github.com/kardianos/osext", "Rev": "8fef92e41e22a70e700a96b29f066cda30ea24ef" }, { "ImportPath": "github.com/kr/pty", "Comment": "release.r56-25-g05017fc", "Rev": "05017fcccf23c823bfdea560dcc958a136e54fb7" }, { "ImportPath": "github.com/matttproud/golang_protobuf_extensions/pbutil", "Rev": "fc2b8d3a73c4867e51861bbdd5ae3c1f0869dd6a" }, { "ImportPath": "github.com/mesos/mesos-go/auth", "Rev": "6440c09c9d8a1b365f3c3e9b2297dd856abd017c" }, { "ImportPath": "github.com/mesos/mesos-go/detector", "Rev": "4b1767c0dfc51020e01f35da5b38472f40ce572a" }, { "ImportPath": "github.com/mesos/mesos-go/executor", "Rev": "4b1767c0dfc51020e01f35da5b38472f40ce572a" }, { "ImportPath": "github.com/mesos/mesos-go/mesosproto", "Rev": "4b1767c0dfc51020e01f35da5b38472f40ce572a" }, { "ImportPath": "github.com/mesos/mesos-go/mesosutil", "Rev": "4b1767c0dfc51020e01f35da5b38472f40ce572a" }, { "ImportPath": "github.com/mesos/mesos-go/messenger", "Rev": "4b1767c0dfc51020e01f35da5b38472f40ce572a" }, { "ImportPath": "github.com/mesos/mesos-go/scheduler", "Rev": "4b1767c0dfc51020e01f35da5b38472f40ce572a" }, { "ImportPath": "github.com/mesos/mesos-go/upid", "Rev": "4b1767c0dfc51020e01f35da5b38472f40ce572a" }, { "ImportPath": "github.com/miekg/dns", "Rev": "3f504e8dabd5d562e997d19ce0200aa41973e1b2" }, { "ImportPath": "github.com/mitchellh/mapstructure", "Rev": "740c764bc6149d3f1806231418adb9f52c11bcbf" }, { "ImportPath": "github.com/onsi/ginkgo", "Comment": "v1.2.0-6-gd981d36", "Rev": "d981d36e9884231afa909627b9c275e4ba678f90" }, { "ImportPath": "github.com/onsi/gomega", "Comment": "v1.0-28-g8adf9e1730c5", "Rev": "8adf9e1730c55cdc590de7d49766cb2acc88d8f2" }, { "ImportPath": "github.com/prometheus/client_golang/model", "Comment": "0.4.0-1-g692492e", "Rev": "692492e54b553a81013254cc1fba4b6dd76fad30" }, { "ImportPath": "github.com/prometheus/client_golang/prometheus", "Comment": "0.4.0-1-g692492e", "Rev": "692492e54b553a81013254cc1fba4b6dd76fad30" }, { "ImportPath": "github.com/prometheus/client_golang/text", "Comment": "0.4.0-1-g692492e", "Rev": "692492e54b553a81013254cc1fba4b6dd76fad30" }, { "ImportPath": "github.com/prometheus/client_model/go", "Comment": "model-0.0.2-12-gfa8ad6f", "Rev": "fa8ad6fec33561be4280a8f0514318c79d7f6cb6" }, { "ImportPath": "github.com/prometheus/procfs", "Rev": "490cc6eb5fa45bf8a8b7b73c8bc82a8160e8531d" }, { "ImportPath": "github.com/rackspace/gophercloud", "Comment": "v1.0.0-569-gf3ced00", "Rev": "f3ced00552c1c7d4a6184500af9062cfb4ff4463" }, { "ImportPath": "github.com/russross/blackfriday", "Comment": "v1.2-42-g77efab5", "Rev": "77efab57b2f74dd3f9051c79752b2e8995c8b789" }, { "ImportPath": "github.com/samuel/go-zookeeper/zk", "Rev": "d0e0d8e11f318e000a8cc434616d69e329edc374" }, { "ImportPath": "github.com/shurcooL/sanitized_anchor_name", "Rev": "9a8b7d4e8f347bfa230879db9d7d4e4d9e19f962" }, { "ImportPath": "github.com/skynetservices/skydns/msg", "Comment": "2.5.1a", "Rev": "1be70b5b8aa07acccd972146d84011b670af88b4" }, { "ImportPath": "github.com/spf13/cobra", "Rev": "8f5946caaeeff40a98d67f60c25e89c3525038a3" }, { "ImportPath": "github.com/spf13/pflag", "Rev": "b91b2a94780f4e6b4d3b0c12fd9b5f4b05b1aa45" }, { "ImportPath": "github.com/stretchr/objx", "Rev": "d40df0cc104c06eae2dfe03d7dddb83802d52f9a" }, { "ImportPath": "github.com/stretchr/testify/assert", "Rev": "7e4a149930b09fe4c2b134c50ce637457ba6e966" }, { "ImportPath": "github.com/stretchr/testify/mock", "Rev": "7e4a149930b09fe4c2b134c50ce637457ba6e966" }, { "ImportPath": "github.com/stretchr/testify/require", "Rev": "7e4a149930b09fe4c2b134c50ce637457ba6e966" }, { "ImportPath": "github.com/syndtr/gocapability/capability", "Rev": "3c85049eaeb429febe7788d9c7aac42322a377fe" }, { "ImportPath": "github.com/ugorji/go/codec", "Rev": "8a2a3a8c488c3ebd98f422a965260278267a0551" }, { "ImportPath": "github.com/vaughan0/go-ini", "Rev": "a98ad7ee00ec53921f08832bc06ecf7fd600e6a1" }, { "ImportPath": "github.com/xyproto/simpleredis", "Comment": "v1.0-13-g5292687", "Rev": "5292687f5379e01054407da44d7c4590a61fd3de" }, { "ImportPath": "golang.org/x/crypto/ssh", "Rev": "c84e1f8e3a7e322d497cd16c0e8a13c7e127baf3" }, { "ImportPath": "golang.org/x/exp/inotify", "Rev": "d00e13ec443927751b2bd49e97dea7bf3b6a6487" }, { "ImportPath": "golang.org/x/net/context", "Rev": "cbcac7bb8415db9b6cb4d1ebab1dc9afbd688b97" }, { "ImportPath": "golang.org/x/net/html", "Rev": "cbcac7bb8415db9b6cb4d1ebab1dc9afbd688b97" }, { "ImportPath": "golang.org/x/net/spdy", "Comment": "deleted-upstream", "Rev": "d175081df37eff8cda13f478bc11a0a65b39958b" }, { "ImportPath": "golang.org/x/net/websocket", }, { "ImportPath": "github.com/ugorji/go/codec", "Rev": "8a2a3a8c488c3ebd98f422a965260278267a0551" }, { "ImportPath": "github.com/vaughan0/go-ini", "Rev": "a98ad7ee00ec53921f08832bc06ecf7fd600e6a1" }, { "ImportPath": "github.com/xyproto/simpleredis", "Comment": "v1.0-13-g5292687", "Rev": "5292687f5379e01054407da44d7c4590a61fd3de" }, { "ImportPath": "golang.org/x/crypto/ssh", "Rev": "c84e1f8e3a7e322d497cd16c0e8a13c7e127baf3" }, { "ImportPath": "golang.org/x/exp/inotify", "Rev": "d00e13ec443927751b2bd49e97dea7bf3b6a6487" }, { "ImportPath": "golang.org/x/net/context", "Rev": "cbcac7bb8415db9b6cb4d1ebab1dc9afbd688b97" }, { "ImportPath": "golang.org/x/net/html", "Rev": "cbcac7bb8415db9b6cb4d1ebab1dc9afbd688b97" }, { "ImportPath": "golang.org/x/net/spdy", "Comment": "deleted-upstream", "Rev": "d175081df37eff8cda13f478bc11a0a65b39958b" }, { "ImportPath": "golang.org/x/net/websocket", "Rev": "cbcac7bb8415db9b6cb4d1ebab1dc9afbd688b97" }, { "ImportPath": "golang.org/x/oauth2", "Rev": "b5adcc2dcdf009d0391547edc6ecbaff889f5bb9" }, { "ImportPath": "google.golang.org/cloud/compute/metadata", "Rev": "2e43671e4ad874a7bca65746ff3edb38e6e93762" }, { "ImportPath": "google.golang.org/cloud/internal", "Rev": "2e43671e4ad874a7bca65746ff3edb38e6e93762" }, { "ImportPath": "gopkg.in/yaml.v2", "Rev": "d466437aa4adc35830964cffc5b5f262c63ddcb4" }, { "ImportPath": "speter.net/go/exp/math/dec/inf", "Rev": "42ca6cd68aa922bc3f32f1e056e61b65945d9ad7" } ] }

qinguoan commented 8 years ago

Sorry I forgot to add my errors. Actually there is no obvious error occurred unless some project moved or delete some folder, it shows "cannot find package in any of GOROOT GOPATH", for me they are: github.com/prometheus/client_golang/model github.com/prometheus/client_golang/text github.com/aws/aws-sdk-go/internal/apierr all above projects deleted some folders between old and current versions.

freeformz commented 8 years ago

Yes so godep tries to 'go get -d' those packages and if it can't you'll get those errors. The go tooling only works off of master atm. So you'll get those errors since those packages don't exist on master anymore.

We probably want to switch to using the appropriate vcs to checkout the right repo instead of go get, but that's probably more work than I think it will be.

this is also probably a source of a lot of restore issue and frustration.

The only way to resolve this atm is manually with something like:

  1. go get -u
  2. Update your code/removing references to no longer supported packages.
  3. Remove the old packages from Godeps/Godeps.json.
  4. godep save to vendor your new imports.
qinguoan commented 8 years ago

I got, many thanks !! 😃