From 18276e9118588dcb4c1357b81686625d9916be2f Mon Sep 17 00:00:00 2001 From: Bryan White Date: Tue, 17 Apr 2018 11:09:22 -0400 Subject: [PATCH 1/3] add dev directory for tracking dev dependencies via vgo (cherry picked from commit d4026c4e801c0957b1ebbba5bb1ffbb8e3e77feb) --- dev/go.mod | 3 +++ dev/main.go | 5 +++++ 2 files changed, 8 insertions(+) create mode 100644 dev/go.mod create mode 100644 dev/main.go diff --git a/dev/go.mod b/dev/go.mod new file mode 100644 index 000000000..7e744343d --- /dev/null +++ b/dev/go.mod @@ -0,0 +1,3 @@ +module "storj.io/storj/dev" + +require "github.com/golang/protobuf" v1.0.0 diff --git a/dev/main.go b/dev/main.go new file mode 100644 index 000000000..0ec184acc --- /dev/null +++ b/dev/main.go @@ -0,0 +1,5 @@ +package main // import "storj.io/storj/dev" + +import ( + "github.com/golang/protobuf/protoc-gen-go" +) From d737a776bfabb641b1b5e930a5867195998b08c4 Mon Sep 17 00:00:00 2001 From: Bryan White Date: Tue, 17 Apr 2018 11:26:54 -0400 Subject: [PATCH 2/3] update readme (cherry picked from commit 7a79a72db0c54142c18fc12ff5eb7280896ea92a) --- README.md | 26 ++++++++++++++++---------- 1 file changed, 16 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index 481356d6e..deaaf815d 100644 --- a/README.md +++ b/README.md @@ -29,25 +29,31 @@ and documentation, who to contact about what, etc. go get -u golang.org/x/vgo ``` -### Set up protobufs +### Install non-go development dependencies -In order to develop on storj, you will need to have protobufs and gRPC installed on your system. +In order to develop on storj, you will need to have the protobuf compiler installed on your system. 1. Grab the latest release for your system from [here](https://github.com/google/protobuf/releases) -2. place the `protoc` binary in your path. i.e +1. place the `protoc` binary in your path. i.e ```bash - mv $HOME/Downloads/protoc-3.5.1-osx-x86_64/bin/protoc /usr/local/bin + mv $HOME/Downloads/protoc--/bin/protoc /usr/local/bin ``` -3. Get the protoc go plugin - ```Go - go get -u github.com/golang/protobuf/protoc-gen-go +### Install go dependencies + +Use vgo to install both dev and non-dev dependencies + +1. Install development dependencies + ```bash + # shouldn't change your pwd + (cd ./dev && vgo install) ``` -4. Get gRPC - ```Go - vgo get -u google.golang.org/grpc +1. Install project dependencies + ```bash + # in project root + vgo install ``` From 8f7d34b63c81efa330f575051660268630e89d44 Mon Sep 17 00:00:00 2001 From: Bryan White Date: Tue, 17 Apr 2018 11:49:24 -0400 Subject: [PATCH 3/3] convert dev-deps imports to be anonymous --- dev/main.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dev/main.go b/dev/main.go index 0ec184acc..cc5575260 100644 --- a/dev/main.go +++ b/dev/main.go @@ -1,5 +1,5 @@ package main // import "storj.io/storj/dev" import ( - "github.com/golang/protobuf/protoc-gen-go" + _ "github.com/golang/protobuf/protoc-gen-go" )