Skip to content
This repository was archived by the owner on Oct 3, 2023. It is now read-only.

Commit fff47fb

Browse files
authored
Fix dependency issues when GO111MODULE is disabled. (#111)
* Use master for core library and ocagent exporter for now. * Fix exemplar dependency. * Also test GO111MODULE=off in travis. * Use tagged version for ocagent exporter. * Fix travis script.
1 parent 16fd214 commit fff47fb

4 files changed

Lines changed: 98 additions & 9 deletions

File tree

.travis.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,7 @@ script:
1818
- if [ -n "$(gofmt -s -l $GO_FILES)" ]; then echo "gofmt the following files:"; gofmt -s -l $GO_FILES; exit 1; fi
1919
- go vet ./...
2020
- go test -v -race $PKGS # Run all the tests with the race detector enabled
21+
- GO111MODULE=off go get -t ./...
22+
- GO111MODULE=off go build ./...
23+
- GO111MODULE=off go test -v -race $PKGS # Make sure tests still pass when not using Go modules.
2124
- 'if [[ $TRAVIS_GO_VERSION = 1.8* ]]; then ! golint ./... | grep -vE "(_mock|_string|\.pb)\.go:"; fi'

equivalence_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ import (
2525
"time"
2626

2727
"contrib.go.opencensus.io/exporter/ocagent"
28-
"go.opencensus.io/exemplar"
28+
"go.opencensus.io/metric/metricdata"
2929
"go.opencensus.io/stats"
3030
"go.opencensus.io/stats/view"
3131
"google.golang.org/api/option"
@@ -193,7 +193,7 @@ func TestEquivalenceStatsVsMetricsUploads(t *testing.T) {
193193
Max: 500,
194194
Mean: 125.9,
195195
CountPerBucket: []int64{0, 1, 0, 0, 0, 0, 0},
196-
ExemplarsPerBucket: []*exemplar.Exemplar{
196+
ExemplarsPerBucket: []*metricdata.Exemplar{
197197
nil,
198198
{
199199
Value: 125.9, Timestamp: startTime.Add(time.Duration(1+i) * time.Second),

go.mod

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,18 @@ module contrib.go.opencensus.io/exporter/stackdriver
22

33
require (
44
cloud.google.com/go v0.36.0
5-
contrib.go.opencensus.io/exporter/ocagent v0.4.7
5+
contrib.go.opencensus.io/exporter/ocagent v0.4.8
66
contrib.go.opencensus.io/resource v0.0.0-20190131005048-21591786a5e0
77
github.com/aws/aws-sdk-go v1.17.5
88
github.com/census-instrumentation/opencensus-proto v0.2.0
99
github.com/golang/protobuf v1.3.0
1010
github.com/google/go-cmp v0.2.0
11-
go.opencensus.io v0.19.0
12-
golang.org/x/net v0.0.0-20181217023233-e147a9138326
13-
golang.org/x/oauth2 v0.0.0-20181203162652-d668ce993890
14-
google.golang.org/api v0.1.0
15-
google.golang.org/genproto v0.0.0-20190201180003-4b09977fb922
16-
google.golang.org/grpc v1.18.0
11+
github.com/grpc-ecosystem/grpc-gateway v1.8.5 // indirect
12+
go.opencensus.io v0.19.2-0.20190319182201-ebb7978abd3f // TODO(songy23): use the released versoin once new release is publised.
13+
golang.org/x/net v0.0.0-20190311183353-d8887717615a
14+
golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421
15+
google.golang.org/api v0.2.0
16+
google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19
17+
google.golang.org/grpc v1.19.0
18+
gopkg.in/yaml.v2 v2.2.2 // indirect
1719
)

0 commit comments

Comments
 (0)