mirror of
https://github.com/weaveworks/scope.git
synced 2026-03-04 10:41:14 +00:00
Not sure what happened, but `gvt` is most likely buggy.
Indeed, if you try to remove `ugorji/go/codec` and pull it again, with the revision listed in `vendor/manifest`, i.e.:
```
$ gvt delete github.com/ugorji/go/codec
$ gvt fetch --revision c062049c1793b01a3cc3fe786108edabbaf7756b github.com/ugorji/go/codec
YYYY/MM/DD HH:mm:SS Fetching: github.com/ugorji/go/codec
```
you then get the below build errors:
```
report/latest_map_generated.go:245:27: r.DecodeStringAsBytes undefined (type codec.decDriver has no field or method DecodeStringAsBytes)
report/latest_map_generated.go:497:27: r.DecodeStringAsBytes undefined (type codec.decDriver has no field or method DecodeStringAsBytes)
report/map_helpers.go:114:27: r.DecodeStringAsBytes undefined (type codec.decDriver has no field or method DecodeStringAsBytes)
report/report.codecgen.go:191:14: r.DecodeStringAsBytes undefined (type codec.decDriver has no field or method DecodeStringAsBytes)
report/report.codecgen.go:496:14: r.DecodeStringAsBytes undefined (type codec.decDriver has no field or method DecodeStringAsBytes)
report/report.codecgen.go:803:14: r.DecodeStringAsBytes undefined (type codec.decDriver has no field or method DecodeStringAsBytes)
report/report.codecgen.go:1001:14: r.DecodeStringAsBytes undefined (type codec.decDriver has no field or method DecodeStringAsBytes)
report/report.codecgen.go:1240:14: r.DecodeStringAsBytes undefined (type codec.decDriver has no field or method DecodeStringAsBytes)
report/report.codecgen.go:1567:14: r.DecodeStringAsBytes undefined (type codec.decDriver has no field or method DecodeStringAsBytes)
report/report.codecgen.go:1858:14: r.DecodeStringAsBytes undefined (type codec.decDriver has no field or method DecodeStringAsBytes)
report/report.codecgen.go:1858:14: too many errors
Makefile:104: recipe for target 'render/detailed/detailed.codecgen.go' failed
```
which I also got in another project importing Scope.
This is fixed by running the following:
```
$ gvt delete github.com/ugorji/go/codec
$ gvt fetch --revision 54210f4e076c57f351166f0ed60e67d3fca57a36 github.com/ugorji/go/codec
YYYY/MM/DD HH:mm:SS Fetching: github.com/ugorji/go/codec
```
Note that this revision was found in previous commit messages:
```
$ git log -S ugorji
[...]
commit 42bf0dedba
Author: Bryan Boreham <bjboreham@gmail.com>
Date: Sat Sep 23 21:08:33 2017 +0000
Update ugorji/go/codec to latest commit 54210f4e076c57f351166f0ed60e67d3fca57a36
[...]
```
Managing Vendored Dependencies with gvt
These operations result in uncommitted changes to your branch; you will need to commit them as normal. Execute them in the root of your checkout.
For these changes to take effect, you'll have to make clean before running
make.
Installing gvt
$ go get -u github.com/FiloSottile/gvt
Adding a Dependency
~/service$ gvt fetch example.com/organisation/module
Updating a Dependency
~/service$ gvt update example.com/organisation/module
Removing a Dependency
~/service$ gvt delete example.com/organisation/module