truechain-consensus-core
truechain-consensus-core copied to clipboard
gvt fetch/update cycle review
here's the scenario, that is hurtful with gvt right now:
- Bob adds 2 packages which have
N
deps. Gets updated intovendor/manifest
- one of the packages from group
N
gets an update on its github. In this case it'stestdata
folder inside grpc library. So when Bob runs a test. It fails, because the update is missing from the git version.
[test] /src:/src/..
[test] src/vendor/google.golang.org/grpc/benchmark/worker/benchmark_client.go:38:2: cannot find package "google.golang.org/grpc/testdata" in any of:
[test] /src/src/vendor/google.golang.org/grpc/testdata (vendor tree)
[test] /src/src/vendor/google.golang.org/grpc/testdata
[test] /usr/local/go/src/google.golang.org/grpc/testdata (from $GOROOT)
[test] /src/src/google.golang.org/grpc/testdata (from $GOPATH)
[test] /src/google.golang.org/grpc/testdata
- . Bob performs a
gvt update
for that specific package. He sees a change reflected in manifest forgrpc-go
.
"vcs": "git",
- "revision": "b519e3d28d377e55a0d44c9b83e6aee4d02d731d",
+ "revision": "445634bdcc9393d2681e504aafd3efc9b28c4bf2",
"branch": "master",
- And so determined that all that's needed is done, he performs another test with
hmake test
. But he still gets:
[test] /src:/src/..
[test] src/vendor/google.golang.org/grpc/benchmark/worker/benchmark_client.go:38:2: cannot find package "google.golang.org/grpc/testdata" in any of:
[test] /src/src/vendor/google.golang.org/grpc/testdata (vendor tree)
[test] /src/src/vendor/google.golang.org/grpc/testdata
[test] /usr/local/go/src/google.golang.org/grpc/testdata (from $GOROOT)
[test] /src/src/google.golang.org/grpc/testdata (from $GOPATH)
[test] /src/google.golang.org/grpc/testdata
- So he checks the folder for latest from https://github.com/grpc/grpc-go/tree/master/testdata
ls vendor/google.golang.org/grpc/testdata ✔ 5579 18:43:36
ls: vendor/google.golang.org/grpc/testdata: No such file or directory
- So to solve this for now, Bob performs a
go get -u google.golang.org/grpc
and solves this withcp -r $GOPATH/src/google.golang.org/grpc/testdata src/vendor/google.golang.org/grpc/
But bob is guilty as charged.
And tired of this game of deps, he wants to get rid of this problem, along with this #39 and https://github.com/FiloSottile/gvt/issues/16 (gvt delete
doesn't clear all deps, or does it?)
Also, if impossible, Bob would probably go for https://github.com/golang/dep/issues/679