Skip to content

Commit

Permalink
Add explicit library dependencies
Browse files Browse the repository at this point in the history
Adds Gopkg.toml and Gopkg.lock with initial dependency
versions. Includes workaround for Apache Thrift repo migration.
Ignores the vendor folder and adds a travis test to ensure dependency
version updates don't break the build.

Fixes census-instrumentation#684.
  • Loading branch information
johanbrandhorst committed Apr 16, 2018
1 parent 5bb1e81 commit 5d2f611
Show file tree
Hide file tree
Showing 4 changed files with 295 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,5 @@
# go.opencensus.io/exporter/aws
/exporter/aws/

# Ignore Go vendor directory
/.vendor/
2 changes: 2 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ before_script:
- PKGS=$(go list ./... | grep -v /vendor/) # All the import paths, excluding vendor/ if any

script:
- dep ensure -v
- go build ./.. # Ensure dependency updates don't break build
- if [ -n "$(gofmt -s -l .)" ]; then echo "gofmt the following files:"; gofmt -s -l .; exit 1; fi
- go vet ./...
- go test -v -race $PKGS # Run all the tests with the race detector enabled
Expand Down
247 changes: 247 additions & 0 deletions Gopkg.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

44 changes: 44 additions & 0 deletions Gopkg.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
[[constraint]]
name = "cloud.google.com/go"
version = "0.21.0"

[[constraint]]
branch = "master"
name = "git.apache.org/thrift.git"
source = "github.com/apache/thrift"

[[constraint]]
name = "github.com/golang/protobuf"
version = "1.0.0"

[[constraint]]
name = "github.com/openzipkin/zipkin-go"
version = "0.1.0"

[[constraint]]
name = "github.com/prometheus/client_golang"
version = "0.8.0"

[[constraint]]
branch = "master"
name = "golang.org/x/net"

[[constraint]]
branch = "master"
name = "golang.org/x/oauth2"

[[constraint]]
branch = "master"
name = "google.golang.org/api"

[[constraint]]
branch = "master"
name = "google.golang.org/genproto"

[[constraint]]
name = "google.golang.org/grpc"
version = "1.11.3"

[prune]
go-tests = true
unused-packages = true

0 comments on commit 5d2f611

Please sign in to comment.