From 51a313be8b011c39a7fc5b7865e526ffb72451af Mon Sep 17 00:00:00 2001 From: Yuri Shkuro Date: Fri, 27 Apr 2018 17:30:01 -0400 Subject: [PATCH 1/3] Fix bad imports caused by splitting IDL files Signed-off-by: Yuri Shkuro --- Makefile | 4 +++- scripts/updateLicenses.sh | 2 +- thrift-gen/agent/agent.go | 1 + thrift-gen/agent/constants.go | 2 ++ thrift-gen/agent/ttypes.go | 2 ++ 5 files changed, 9 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index f1231a8d..42f2c271 100644 --- a/Makefile +++ b/Makefile @@ -79,13 +79,15 @@ test-examples: thrift: idl-submodule thrift-image $(THRIFT) -o /data --gen go:$(THRIFT_GO_ARGS) --out /data/$(THRIFT_GEN_DIR) /data/idl/thrift/agent.thrift sed -i '' 's|"zipkincore"|"$(PROJECT_ROOT)/thrift-gen/zipkincore"|g' $(THRIFT_GEN_DIR)/agent/*.go + sed -i '' 's|"jaeger"|"$(PROJECT_ROOT)/thrift-gen/jaeger"|g' $(THRIFT_GEN_DIR)/agent/*.go $(THRIFT) -o /data --gen go:$(THRIFT_GO_ARGS) --out /data/$(THRIFT_GEN_DIR) /data/idl/thrift/sampling.thrift $(THRIFT) -o /data --gen go:$(THRIFT_GO_ARGS) --out /data/$(THRIFT_GEN_DIR) /data/idl/thrift/jaeger.thrift $(THRIFT) -o /data --gen go:$(THRIFT_GO_ARGS) --out /data/$(THRIFT_GEN_DIR) /data/idl/thrift/zipkincore.thrift $(THRIFT) -o /data --gen go:$(THRIFT_GO_ARGS) --out /data/$(THRIFT_GEN_DIR) /data/idl/thrift/baggage.thrift - rm -rf thrift-gen/*/*-remote $(THRIFT) -o /data --gen go:$(THRIFT_GO_ARGS) --out /data/crossdock/thrift/ /data/idl/thrift/crossdock/tracetest.thrift + rm -rf thrift-gen/*/*-remote rm -rf crossdock/thrift/*/*-remote + rm -rf thrift-gen/jaeger/collector.go idl-submodule: git submodule init diff --git a/scripts/updateLicenses.sh b/scripts/updateLicenses.sh index fa97364e..e10590b8 100755 --- a/scripts/updateLicenses.sh +++ b/scripts/updateLicenses.sh @@ -2,4 +2,4 @@ set -e -python scripts/updateLicense.py $(git ls-files "*\.go" | grep -v thrift-gen | grep -v tracetest) +python scripts/updateLicense.py $(git ls-files "*\.go" | grep -v thrift-gen | grep -v tracetest grep -v internal/vendor) diff --git a/thrift-gen/agent/agent.go b/thrift-gen/agent/agent.go index a192cb6f..657252b6 100644 --- a/thrift-gen/agent/agent.go +++ b/thrift-gen/agent/agent.go @@ -16,6 +16,7 @@ var _ = thrift.ZERO var _ = fmt.Printf var _ = bytes.Equal +var _ = jaeger.GoUnusedProtection__ var _ = zipkincore.GoUnusedProtection__ type Agent interface { diff --git a/thrift-gen/agent/constants.go b/thrift-gen/agent/constants.go index 369d016e..2e7e7afd 100644 --- a/thrift-gen/agent/constants.go +++ b/thrift-gen/agent/constants.go @@ -7,6 +7,7 @@ import ( "bytes" "fmt" "github.com/apache/thrift/lib/go/thrift" + "github.com/uber/jaeger-client-go/thrift-gen/jaeger" "github.com/uber/jaeger-client-go/thrift-gen/zipkincore" ) @@ -15,6 +16,7 @@ var _ = thrift.ZERO var _ = fmt.Printf var _ = bytes.Equal +var _ = jaeger.GoUnusedProtection__ var _ = zipkincore.GoUnusedProtection__ func init() { diff --git a/thrift-gen/agent/ttypes.go b/thrift-gen/agent/ttypes.go index f377c227..1fe7cc47 100644 --- a/thrift-gen/agent/ttypes.go +++ b/thrift-gen/agent/ttypes.go @@ -7,6 +7,7 @@ import ( "bytes" "fmt" "github.com/apache/thrift/lib/go/thrift" + "github.com/uber/jaeger-client-go/thrift-gen/jaeger" "github.com/uber/jaeger-client-go/thrift-gen/zipkincore" ) @@ -15,5 +16,6 @@ var _ = thrift.ZERO var _ = fmt.Printf var _ = bytes.Equal +var _ = jaeger.GoUnusedProtection__ var _ = zipkincore.GoUnusedProtection__ var GoUnusedProtection__ int From 923d2120ec998ee04d0e61e1aaeb7d6a69af6c0b Mon Sep 17 00:00:00 2001 From: Yuri Shkuro Date: Fri, 27 Apr 2018 17:38:47 -0400 Subject: [PATCH 2/3] Undo wrong change Signed-off-by: Yuri Shkuro --- scripts/updateLicenses.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/updateLicenses.sh b/scripts/updateLicenses.sh index e10590b8..1d912be2 100755 --- a/scripts/updateLicenses.sh +++ b/scripts/updateLicenses.sh @@ -2,4 +2,4 @@ set -e -python scripts/updateLicense.py $(git ls-files "*\.go" | grep -v thrift-gen | grep -v tracetest grep -v internal/vendor) +python scripts/updateLicense.py $(git ls-files "*\.go" | grep -v thrift-gen | grep -v tracetest ) From c39d3455f415434f35394887600ebdc8de853f1a Mon Sep 17 00:00:00 2001 From: Yuri Shkuro Date: Fri, 27 Apr 2018 17:39:12 -0400 Subject: [PATCH 3/3] Undo wrong change Signed-off-by: Yuri Shkuro --- scripts/updateLicenses.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/updateLicenses.sh b/scripts/updateLicenses.sh index 1d912be2..fa97364e 100755 --- a/scripts/updateLicenses.sh +++ b/scripts/updateLicenses.sh @@ -2,4 +2,4 @@ set -e -python scripts/updateLicense.py $(git ls-files "*\.go" | grep -v thrift-gen | grep -v tracetest ) +python scripts/updateLicense.py $(git ls-files "*\.go" | grep -v thrift-gen | grep -v tracetest)