Replace glide with dep
This commit is contained in:
parent
ce689ab4f3
commit
9afe696bf4
@ -13,7 +13,7 @@ Usually, Cosmos SDK can be installed like a normal Go program:
|
||||
go get -u github.com/cosmos/cosmos-sdk
|
||||
|
||||
If the dependencies have been updated with breaking changes, or if
|
||||
another branch is required, ``glide`` is used for dependency management.
|
||||
another branch is required, ``dep`` is used for dependency management.
|
||||
Thus, assuming you've already run ``go get`` or otherwise cloned the
|
||||
repo, the correct way to install is:
|
||||
|
||||
@ -24,12 +24,12 @@ repo, the correct way to install is:
|
||||
make all
|
||||
|
||||
This will create the ``basecoin`` binary in ``$GOPATH/bin``.
|
||||
``make all`` implies ``make get_vendor_deps`` and uses ``glide`` to
|
||||
``make all`` implies ``make get_vendor_deps`` and uses ``dep`` to
|
||||
install the correct version of all dependencies. It also tests the code,
|
||||
including some cli tests to make sure your binary behaves properly.
|
||||
|
||||
If you need another branch, make sure to run ``git checkout <branch>``
|
||||
before ``make all``. And if you switch branches a lot, especially
|
||||
touching other tendermint repos, you may need to ``make fresh``
|
||||
sometimes so glide doesn't get confused with all the branches and
|
||||
sometimes so dep doesn't get confused with all the branches and
|
||||
versions lying around.
|
||||
|
||||
@ -56,7 +56,7 @@ Strictly speaking, Golang does not implement object capabilities completely, bec
|
||||
* pervasive ability to override module vars https://github.com/golang/go/issues/23161
|
||||
* data-race vulnerability where 2+ goroutines can create illegal interface values
|
||||
|
||||
The first is easy to catch by auditing imports and using a proper dependency version control system like Glide. The second and third are unfortunate but it can be audited with some cost.
|
||||
The first is easy to catch by auditing imports and using a proper dependency version control system like Dep. The second and third are unfortunate but it can be audited with some cost.
|
||||
|
||||
Perhaps `Go2 will implement the object capability model <https://github.com/golang/go/issues/23157>`__.
|
||||
|
||||
|
||||
@ -1,11 +1,18 @@
|
||||
PACKAGES=$(shell go list ./... | grep -v '/vendor/')
|
||||
BUILD_FLAGS = -ldflags "-X github.com/cosmos/cosmos-sdk/examples/basecoin/version.GitCommit=`git rev-parse --short HEAD`"
|
||||
|
||||
all: build test
|
||||
all: get_tools get_vendor_deps build test
|
||||
|
||||
get_tools:
|
||||
go get github.com/golang/dep/cmd/dep
|
||||
|
||||
build:
|
||||
go build $(BUILD_FLAGS) -o build/basecoin ./cmd/...
|
||||
|
||||
get_vendor_deps:
|
||||
@rm -rf vendor/
|
||||
@dep ensure
|
||||
|
||||
test:
|
||||
@go test $(PACKAGES)
|
||||
|
||||
|
||||
@ -1,8 +1,8 @@
|
||||
all: install_glide check get_vendor_deps install
|
||||
all: install_dep check get_vendor_deps install
|
||||
|
||||
|
||||
########################################
|
||||
### Glide
|
||||
### DEP
|
||||
|
||||
DEP = github.com/golang/dep/cmd/dep
|
||||
DEP_CHECK := $(shell command -v dep 2> /dev/null)
|
||||
|
||||
@ -1,10 +1,10 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
// Include dependencies here so glide picks them up
|
||||
// Include dependencies here so dep picks them up
|
||||
// and installs sub-dependencies.
|
||||
|
||||
// TODO: Ideally this gets auto-imported on glide update.
|
||||
// TODO: Ideally this gets auto-imported on dep update.
|
||||
// Any way to make that happen?
|
||||
_ "github.com/rigelrozanski/common"
|
||||
)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user