godeps: fix and update dependencies#2893
Conversation
Godeps should allow me to do godep restore godep save -r ./... But that doesn't work. Try it. This requires update to the following packages: github.com/prometheus/client_golang/ github.com/prometheus/procfs github.com/matttproud/golang_protobuf_extensions/ There were 2 major problems. 1. godeps have code.google.com/p/goprotobuf but that repo doesn't exist 2. prometheus/client_golang/_vendor moved to other packages and godep (with -r) can't handle it. At the end of this we should be able to use godeps again without tons of black magic. uggh. what a pain in the ass. The black magic to actually get godeps back in shape was: ```bash # remove code.google.com/p/goprotobuf (doesn't exist) # remove all _vendor lines from prometheus (we still have other # prometheus lines so restore still works) vi Godeps/Godeps.json # remove all the crazy vendoring crud because godep doesn't handle it # correctly find . -name \*.go | xargs sed -i 's|github.com/coreos/etcd/Godeps/_workspace/src/||' # ok now, restore as best we can (everything except it wines about # goprotobuf godep restore # now update the packages which were using the old (dead) goprotobuf go get -u github.com/prometheus/client_golang/ go get -u github.com/matttproud/golang_protobuf_extensions/ # update prometheus procfs because prometheus/client_golang/ has a # dependancy on this update go get -u github.com/prometheus/procfs # get rid of Godeps directory entirely git rm -rf Godeps # ok, now, rewrite the Godeps directory and redo the path rewrites godep save -r ./... # now put Godeps back into git git add Godeps/ # commit the new code git commit -aA # And now, you can use godeps! godep restore godep save -r ./... git diff # nothing!! ```
|
@eparis Thanks for fixing this... I have tried several times, but failed... I will take a careful look tomorrow! |
|
@eparis Ah... All very reasonable... I guess godep update should work like your script... LGTM |
|
updated title. godep -r is just brittle. /me dislikes the coreos/-r rewrite policy, but at least now we know how to handle it if it ever fails us again! |
|
(godep can't/shouldn't use this procedure for update, because it requires destroying the local GOPATH) |
|
@eparis restore already rewrite the local gopath pkg. if there is a remote git problem, godep should at least provide a clean way to let me resolve it. |
|
@xiang90 sure, to solve this borken-ness I had to use restore, but normally "godeps update" does not require a restore... |
|
(although admittedly I find myself using |
godeps: fix and update dependencies
Godeps should allow me to do
godep restore
godep save -r ./...
But that doesn't work. Try it.
This requires update to the following packages:
github.com/prometheus/client_golang/
github.com/prometheus/procfs
github.com/matttproud/golang_protobuf_extensions/
There were 2 major problems.
(with -r) can't handle it.
At the end of this we should be able to use godeps again without tons of
black magic. uggh. what a pain in the ass.
The black magic to actually get godeps back in shape was: