From ce689ab4f36386f18183515677cd3b5ca5e97059 Mon Sep 17 00:00:00 2001 From: Zaki Manian Date: Sun, 25 Feb 2018 06:30:24 -0800 Subject: [PATCH] Switch dependency resolution to dep and update Makefile to use dep --- Gopkg.lock | 347 +++++++++++++++++++++++++++++++++++++++++++++++ Gopkg.toml | 70 ++++++++++ Makefile | 6 +- tools/Gopkg.lock | 15 ++ tools/Gopkg.toml | 34 +++++ tools/Makefile | 32 ++--- 6 files changed, 485 insertions(+), 19 deletions(-) create mode 100644 Gopkg.lock create mode 100644 Gopkg.toml create mode 100644 tools/Gopkg.lock create mode 100644 tools/Gopkg.toml diff --git a/Gopkg.lock b/Gopkg.lock new file mode 100644 index 000000000..0b6fe7873 --- /dev/null +++ b/Gopkg.lock @@ -0,0 +1,347 @@ +# This file is autogenerated, do not edit; changes may be undone by the next 'dep ensure'. + + +[[projects]] + name = "github.com/btcsuite/btcd" + packages = ["btcec"] + revision = "50de9da05b50eb15658bb350f6ea24368a111ab7" + +[[projects]] + name = "github.com/davecgh/go-spew" + packages = ["spew"] + revision = "346938d642f2ec3594ed81d874461961cd0faa76" + version = "v1.1.0" + +[[projects]] + name = "github.com/fsnotify/fsnotify" + packages = ["."] + revision = "c2828203cd70a50dcccfb2761f8b1f8ceef9a8e9" + version = "v1.4.7" + +[[projects]] + name = "github.com/go-kit/kit" + packages = [ + "log", + "log/level", + "log/term" + ] + revision = "4dc7be5d2d12881735283bcab7352178e190fc71" + version = "v0.6.0" + +[[projects]] + name = "github.com/go-logfmt/logfmt" + packages = ["."] + revision = "390ab7935ee28ec6b286364bba9b4dd6410cb3d5" + version = "v0.3.0" + +[[projects]] + name = "github.com/go-stack/stack" + packages = ["."] + revision = "259ab82a6cad3992b4e21ff5cac294ccb06474bc" + version = "v1.7.0" + +[[projects]] + name = "github.com/gogo/protobuf" + packages = [ + "gogoproto", + "jsonpb", + "proto", + "protoc-gen-gogo/descriptor", + "sortkeys", + "types" + ] + revision = "1adfc126b41513cc696b209667c8656ea7aac67c" + version = "v1.0.0" + +[[projects]] + name = "github.com/golang/protobuf" + packages = [ + "proto", + "ptypes", + "ptypes/any", + "ptypes/duration", + "ptypes/timestamp" + ] + revision = "925541529c1fa6821df4e44ce2723319eb2be768" + version = "v1.0.0" + +[[projects]] + branch = "master" + name = "github.com/golang/snappy" + packages = ["."] + revision = "553a641470496b2327abcac10b36396bd98e45c9" + +[[projects]] + branch = "master" + name = "github.com/hashicorp/hcl" + packages = [ + ".", + "hcl/ast", + "hcl/parser", + "hcl/scanner", + "hcl/strconv", + "hcl/token", + "json/parser", + "json/scanner", + "json/token" + ] + revision = "23c074d0eceb2b8a5bfdbb271ab780cde70f05a8" + +[[projects]] + name = "github.com/inconshreveable/mousetrap" + packages = ["."] + revision = "76626ae9c91c4f2a10f34cad8ce83ea42c93bb75" + version = "v1.0" + +[[projects]] + branch = "master" + name = "github.com/jmhodges/levigo" + packages = ["."] + revision = "c42d9e0ca023e2198120196f842701bb4c55d7b9" + +[[projects]] + branch = "master" + name = "github.com/kr/logfmt" + packages = ["."] + revision = "b84e30acd515aadc4b783ad4ff83aff3299bdfe0" + +[[projects]] + name = "github.com/magiconair/properties" + packages = ["."] + revision = "49d762b9817ba1c2e9d0c69183c2b4a8b8f1d934" + +[[projects]] + name = "github.com/mitchellh/mapstructure" + packages = ["."] + revision = "b4575eea38cca1123ec2dc90c26529b5c5acfcff" + +[[projects]] + name = "github.com/pelletier/go-toml" + packages = ["."] + revision = "acdc4509485b587f5e675510c4f2c63e90ff68a8" + version = "v1.1.0" + +[[projects]] + name = "github.com/pkg/errors" + packages = ["."] + revision = "645ef00459ed84a119197bfb8d8205042c6df63d" + version = "v0.8.0" + +[[projects]] + name = "github.com/pmezard/go-difflib" + packages = ["difflib"] + revision = "792786c7400a136282c1664665ae0a8db921c6c2" + version = "v1.0.0" + +[[projects]] + branch = "master" + name = "github.com/rigelrozanski/common" + packages = ["."] + revision = "f691f115798593d783b9999b1263c2f4ffecc439" + +[[projects]] + name = "github.com/spf13/afero" + packages = [ + ".", + "mem" + ] + revision = "bb8f1927f2a9d3ab41c9340aa034f6b803f4359c" + version = "v1.0.2" + +[[projects]] + name = "github.com/spf13/cast" + packages = ["."] + revision = "acbeb36b902d72a7a4c18e8f3241075e7ab763e4" + version = "v1.1.0" + +[[projects]] + name = "github.com/spf13/cobra" + packages = ["."] + revision = "7b2c5ac9fc04fc5efafb60700713d4fa609b777b" + version = "v0.0.1" + +[[projects]] + branch = "master" + name = "github.com/spf13/jwalterweatherman" + packages = ["."] + revision = "7c0cea34c8ece3fbeb2b27ab9b59511d360fb394" + +[[projects]] + name = "github.com/spf13/pflag" + packages = ["."] + revision = "e57e3eeb33f795204c1ca35f56c44f83227c6e66" + version = "v1.0.0" + +[[projects]] + name = "github.com/spf13/viper" + packages = ["."] + revision = "25b30aa063fc18e48662b86996252eabdcf2f0c7" + version = "v1.0.0" + +[[projects]] + name = "github.com/stretchr/testify" + packages = [ + "assert", + "require" + ] + revision = "12b6f73e6084dad08a7c6e575284b177ecafbc71" + version = "v1.2.1" + +[[projects]] + name = "github.com/syndtr/goleveldb" + packages = [ + "leveldb", + "leveldb/cache", + "leveldb/comparer", + "leveldb/errors", + "leveldb/filter", + "leveldb/iterator", + "leveldb/journal", + "leveldb/memdb", + "leveldb/opt", + "leveldb/storage", + "leveldb/table", + "leveldb/util" + ] + revision = "34011bf325bce385408353a30b101fe5e923eb6e" + +[[projects]] + branch = "develop" + name = "github.com/tendermint/abci" + packages = [ + "server", + "types" + ] + revision = "c960c5275617ef141c92c3d7fc65a396c97662df" + +[[projects]] + branch = "master" + name = "github.com/tendermint/ed25519" + packages = [ + ".", + "edwards25519", + "extra25519" + ] + revision = "d8387025d2b9d158cf4efb07e7ebf814bcce2057" + +[[projects]] + branch = "develop" + name = "github.com/tendermint/go-crypto" + packages = ["."] + revision = "4fc3055dbd17aa1203d0abc64b9293f378da22ec" + +[[projects]] + branch = "develop" + name = "github.com/tendermint/go-wire" + packages = ["."] + revision = "5d7845f24b843c914cf571dad2ca13c91cf70f0d" + +[[projects]] + branch = "develop" + name = "github.com/tendermint/iavl" + packages = ["."] + revision = "1a59ec0c82dc940c25339dd7c834df5cb76a95cb" + +[[projects]] + branch = "develop" + name = "github.com/tendermint/tmlibs" + packages = [ + "cli", + "common", + "db", + "log", + "merkle" + ] + revision = "a0f652dc2e131be86fc8d9e4e2beec9831a8a6ec" + +[[projects]] + name = "golang.org/x/crypto" + packages = [ + "nacl/secretbox", + "openpgp/armor", + "openpgp/errors", + "poly1305", + "ripemd160", + "salsa20/salsa" + ] + revision = "1875d0a70c90e57f11972aefd42276df65e895b9" + +[[projects]] + name = "golang.org/x/net" + packages = [ + "context", + "http2", + "http2/hpack", + "idna", + "internal/timeseries", + "lex/httplex", + "trace" + ] + revision = "2fb46b16b8dda405028c50f7c7f0f9dd1fa6bfb1" + +[[projects]] + name = "golang.org/x/sys" + packages = ["unix"] + revision = "37707fdb30a5b38865cfb95e5aab41707daec7fd" + +[[projects]] + name = "golang.org/x/text" + packages = [ + "collate", + "collate/build", + "internal/colltab", + "internal/gen", + "internal/tag", + "internal/triegen", + "internal/ucd", + "language", + "secure/bidirule", + "transform", + "unicode/bidi", + "unicode/cldr", + "unicode/norm", + "unicode/rangetable" + ] + revision = "e19ae1496984b1c655b8044a65c0300a3c878dd3" + +[[projects]] + name = "google.golang.org/genproto" + packages = ["googleapis/rpc/status"] + revision = "4eb30f4778eed4c258ba66527a0d4f9ec8a36c45" + +[[projects]] + name = "google.golang.org/grpc" + packages = [ + ".", + "balancer", + "codes", + "connectivity", + "credentials", + "grpclb/grpc_lb_v1/messages", + "grpclog", + "internal", + "keepalive", + "metadata", + "naming", + "peer", + "resolver", + "stats", + "status", + "tap", + "transport" + ] + revision = "401e0e00e4bb830a10496d64cd95e068c5bf50de" + version = "v1.7.3" + +[[projects]] + name = "gopkg.in/yaml.v2" + packages = ["."] + revision = "d670f9405373e636a5a2765eea47fac0c9bc91a4" + version = "v2.0.0" + +[solve-meta] + analyzer-name = "dep" + analyzer-version = 1 + inputs-digest = "74f3444e7f0d4ffdeb4454fbbf10064b2cb87f44a5b94cffd19fc6c459ddeef6" + solver-name = "gps-cdcl" + solver-version = 1 diff --git a/Gopkg.toml b/Gopkg.toml new file mode 100644 index 000000000..f13991a61 --- /dev/null +++ b/Gopkg.toml @@ -0,0 +1,70 @@ +# Gopkg.toml example +# +# Refer to https://github.com/golang/dep/blob/master/docs/Gopkg.toml.md +# for detailed Gopkg.toml documentation. +# +# required = ["github.com/user/thing/cmd/thing"] +# ignored = ["github.com/user/project/pkgX", "bitbucket.org/user/project/pkgA/pkgY"] +# +# [[constraint]] +# name = "github.com/user/project" +# version = "1.0.0" +# +# [[constraint]] +# name = "github.com/user/project2" +# branch = "dev" +# source = "github.com/myfork/project2" +# +# [[override]] +# name = "github.com/x/y" +# version = "2.4.0" +# +# [prune] +# non-go = false +# go-tests = true +# unused-packages = true + + +[[constraint]] + name = "github.com/golang/protobuf" + version = "1.0.0" + +[[constraint]] + name = "github.com/pkg/errors" + version = "0.8.0" + +[[constraint]] + branch = "master" + name = "github.com/rigelrozanski/common" + +[[constraint]] + name = "github.com/spf13/cobra" + version = "0.0.1" + +[[constraint]] + name = "github.com/stretchr/testify" + version = "1.2.1" + +[[constraint]] + branch = "develop" + name = "github.com/tendermint/abci" + +[[constraint]] + branch = "develop" + name = "github.com/tendermint/go-crypto" + +[[constraint]] + branch = "develop" + name = "github.com/tendermint/go-wire" + +[[constraint]] + branch = "develop" + name = "github.com/tendermint/iavl" + +[[constraint]] + branch = "develop" + name = "github.com/tendermint/tmlibs" + +[prune] + go-tests = true + unused-packages = true diff --git a/Makefile b/Makefile index 395af306a..9315a5bb8 100644 --- a/Makefile +++ b/Makefile @@ -32,15 +32,15 @@ check_tools: cd tools && $(MAKE) check update_tools: - cd tools && $(MAKE) glide_update + cd tools && $(MAKE) dep_update get_tools: cd tools && $(MAKE) get_vendor_deps: @rm -rf vendor/ - @echo "--> Running glide install" - @glide install + @echo "--> Running dep ensure" + @dep ensure draw_deps: @# requires brew install graphviz or apt-get install graphviz diff --git a/tools/Gopkg.lock b/tools/Gopkg.lock new file mode 100644 index 000000000..ba42ba9bf --- /dev/null +++ b/tools/Gopkg.lock @@ -0,0 +1,15 @@ +# This file is autogenerated, do not edit; changes may be undone by the next 'dep ensure'. + + +[[projects]] + branch = "master" + name = "github.com/rigelrozanski/common" + packages = ["."] + revision = "f691f115798593d783b9999b1263c2f4ffecc439" + +[solve-meta] + analyzer-name = "dep" + analyzer-version = 1 + inputs-digest = "d94d5d70f00be97bb05e110d607c4d4de794e25111377b02078891bf494e38e1" + solver-name = "gps-cdcl" + solver-version = 1 diff --git a/tools/Gopkg.toml b/tools/Gopkg.toml new file mode 100644 index 000000000..2e03fd482 --- /dev/null +++ b/tools/Gopkg.toml @@ -0,0 +1,34 @@ +# Gopkg.toml example +# +# Refer to https://github.com/golang/dep/blob/master/docs/Gopkg.toml.md +# for detailed Gopkg.toml documentation. +# +# required = ["github.com/user/thing/cmd/thing"] +# ignored = ["github.com/user/project/pkgX", "bitbucket.org/user/project/pkgA/pkgY"] +# +# [[constraint]] +# name = "github.com/user/project" +# version = "1.0.0" +# +# [[constraint]] +# name = "github.com/user/project2" +# branch = "dev" +# source = "github.com/myfork/project2" +# +# [[override]] +# name = "github.com/x/y" +# version = "2.4.0" +# +# [prune] +# non-go = false +# go-tests = true +# unused-packages = true + + +[[constraint]] + branch = "master" + name = "github.com/rigelrozanski/common" + +[prune] + go-tests = true + unused-packages = true diff --git a/tools/Makefile b/tools/Makefile index 6786575cd..986268f6d 100644 --- a/tools/Makefile +++ b/tools/Makefile @@ -4,27 +4,27 @@ all: install_glide check get_vendor_deps install ######################################## ### Glide -GLIDE = github.com/tendermint/glide -GLIDE_CHECK := $(shell command -v glide 2> /dev/null) +DEP = github.com/golang/dep/cmd/dep +DEP_CHECK := $(shell command -v dep 2> /dev/null) check: -ifndef GLIDE_CHECK - @echo "No glide in path. Install with 'make install_glide'." +ifndef DEP_CHECK + @echo "No dep in path. Install with 'make install_dep'." else - @echo "Found glide in path." + @echo "Found dep in path." endif -install_glide: -ifdef GLIDE_CHECK - @echo "Glide is already installed. Run 'make update_glide' to update." +install_dep: +ifdef DEP_CHECK + @echo "Dep is already installed. Run 'make update_dep' to update." else - @echo "$(ansi_grn)Installing glide$(ansi_end)" - go get -v $(GLIDE) + @echo "$(ansi_grn)Installing dep$(ansi_end)" + go get -v $(DEP) endif -update_glide: - @echo "$(ansi_grn)Updating glide$(ansi_end)" - go get -u -v $(GLIDE) +update_dep: + @echo "$(ansi_grn)Updating dep$(ansi_end)" + go get -u -v $(DEP) ######################################## @@ -33,8 +33,8 @@ update_glide: get_vendor_deps: check @rm -rf vendor/ - @echo "--> Running glide install" - @glide install + @echo "--> Running dep ensure" + @dep ensure install: get_vendor_deps @echo "$(ansi_grn)Installing tools$(ansi_end)" @@ -62,4 +62,4 @@ ansi_end=\033[0m # To avoid unintended conflicts with file names, always add to .PHONY # unless there is a reason not to. # https://www.gnu.org/software/make/manual/html_node/Phony-Targets.html -.PHONY: check install_glide update_glide get_vendor_deps install +.PHONY: check install_dep update_dep get_vendor_deps install