Skip to content

Commit bde61b5

Browse files
committed
Rename .gen -> gen for go 1.16 compatibility
1 parent d39d428 commit bde61b5

File tree

159 files changed

+329
-330
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

159 files changed

+329
-330
lines changed

Makefile

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -105,12 +105,12 @@ $(BIN)/protoc: | $(BIN)
105105
cp $(BIN)/protoc-zip/bin/protoc $(BIN)/protoc
106106

107107
# any generated file - they all depend on each other / are generated at once, so any will work
108-
PROTO_GEN_SRC = ./.gen/proto/admin/v1/service.pb.go
108+
PROTO_GEN_SRC = ./gen/proto/admin/v1/service.pb.go
109109

110-
THRIFT_GENDIR=.gen/go
110+
THRIFT_GENDIR=gen/go
111111
THRIFT_SRCS := $(shell find idls -name '*.thrift')
112112
# concrete targets to build / the "sentinel" go files that need to be produced per thrift file.
113-
# idls/thrift/thing.thrift -> thing.thrift -> thing -> ./.gen/go/thing/thing.go
113+
# idls/thrift/thing.thrift -> thing.thrift -> thing -> ./gen/go/thing/thing.go
114114
THRIFT_GEN_SRC := $(foreach tsrc,$(basename $(subst idls/thrift/,,$(THRIFT_SRCS))),./$(THRIFT_GENDIR)/$(tsrc)/$(tsrc).go)
115115

116116
# this is a "false" dependency chain, but it convinces make that "need to make thriftrw(-plugin-yarpc)"
@@ -130,7 +130,7 @@ $(THRIFT_SRCS): $(BIN)/thriftrw $(BIN)/thriftrw-plugin-yarpc
130130
# how to generate each thrift file.
131131
# note that each generated file depends on ALL thrift files - this is necessary because they can import each other.
132132
$(THRIFT_GEN_SRC): $(THRIFT_SRCS) go.mod
133-
@# .gen/go/thing/thing.go -> thing.go -> "thing " -> thing -> idls/thrift/thing.thrift
133+
@# gen/go/thing/thing.go -> thing.go -> "thing " -> thing -> idls/thrift/thing.thrift
134134
@echo 'thriftrw for idls/thrift/$(strip $(basename $(notdir $@))).thrift...'
135135
@$(BIN_PATH) $(BIN)/thriftrw \
136136
--plugin=yarpc \
@@ -163,7 +163,7 @@ ALL_SRC := $(FRESH_ALL_SRC)
163163
ALL_SRC += $(THRIFT_GEN_SRC)
164164
ALL_SRC += $(PROTO_GEN_SRC)
165165
ALL_SRC := $(sort $(ALL_SRC)) # dedup
166-
LINT_SRC := $(filter-out %_test.go ./.gen/%, $(ALL_SRC))
166+
LINT_SRC := $(filter-out %_test.go ./gen/%, $(ALL_SRC))
167167
# all directories with *_test.go files in them (exclude host/xdc)
168168
TEST_DIRS := $(filter-out $(INTEG_TEST_XDC_ROOT)%, $(sort $(dir $(filter %_test.go,$(ALL_SRC)))))
169169
# all tests other than end-to-end integration test fall into the pkg_test category
@@ -201,7 +201,7 @@ thriftc: $(THRIFT_GEN_SRC) copyright ## rebuild thrift-generated source files
201201
proto: proto-lint proto-compile fmt copyright
202202

203203
PROTO_ROOT := proto
204-
PROTO_OUT := .gen/proto
204+
PROTO_OUT := gen/proto
205205
PROTO_FILES = $(shell find ./$(PROTO_ROOT) -name "*.proto" | grep -v "persistenceblobs")
206206
PROTO_DIRS = $(sort $(dir $(PROTO_FILES)))
207207

@@ -342,13 +342,13 @@ cover_ndc_profile: clean bins_nothrift
342342

343343
$(COVER_ROOT)/cover.out: $(UNIT_COVER_FILE) $(INTEG_COVER_FILE_CASS) $(INTEG_COVER_FILE_MYSQL) $(INTEG_COVER_FILE_POSTGRES) $(INTEG_NDC_COVER_FILE_CASS) $(INTEG_NDC_COVER_FILE_MYSQL) $(INTEG_NDC_COVER_FILE_POSTGRES)
344344
@echo "mode: atomic" > $(COVER_ROOT)/cover.out
345-
cat $(UNIT_COVER_FILE) | grep -v "^mode: \w\+" | grep -vP ".gen|[Mm]ock[s]?" >> $(COVER_ROOT)/cover.out
346-
cat $(INTEG_COVER_FILE_CASS) | grep -v "^mode: \w\+" | grep -vP ".gen|[Mm]ock[s]?" >> $(COVER_ROOT)/cover.out
347-
cat $(INTEG_COVER_FILE_MYSQL) | grep -v "^mode: \w\+" | grep -vP ".gen|[Mm]ock[s]?" >> $(COVER_ROOT)/cover.out
348-
cat $(INTEG_COVER_FILE_POSTGRES) | grep -v "^mode: \w\+" | grep -vP ".gen|[Mm]ock[s]?" >> $(COVER_ROOT)/cover.out
349-
cat $(INTEG_NDC_COVER_FILE_CASS) | grep -v "^mode: \w\+" | grep -vP ".gen|[Mm]ock[s]?" >> $(COVER_ROOT)/cover.out
350-
cat $(INTEG_NDC_COVER_FILE_MYSQL) | grep -v "^mode: \w\+" | grep -vP ".gen|[Mm]ock[s]?" >> $(COVER_ROOT)/cover.out
351-
cat $(INTEG_NDC_COVER_FILE_POSTGRES) | grep -v "^mode: \w\+" | grep -vP ".gen|[Mm]ock[s]?" >> $(COVER_ROOT)/cover.out
345+
cat $(UNIT_COVER_FILE) | grep -v "^mode: \w\+" | grep -vP "gen|[Mm]ock[s]?" >> $(COVER_ROOT)/cover.out
346+
cat $(INTEG_COVER_FILE_CASS) | grep -v "^mode: \w\+" | grep -vP "gen|[Mm]ock[s]?" >> $(COVER_ROOT)/cover.out
347+
cat $(INTEG_COVER_FILE_MYSQL) | grep -v "^mode: \w\+" | grep -vP "gen|[Mm]ock[s]?" >> $(COVER_ROOT)/cover.out
348+
cat $(INTEG_COVER_FILE_POSTGRES) | grep -v "^mode: \w\+" | grep -vP "gen|[Mm]ock[s]?" >> $(COVER_ROOT)/cover.out
349+
cat $(INTEG_NDC_COVER_FILE_CASS) | grep -v "^mode: \w\+" | grep -vP "gen|[Mm]ock[s]?" >> $(COVER_ROOT)/cover.out
350+
cat $(INTEG_NDC_COVER_FILE_MYSQL) | grep -v "^mode: \w\+" | grep -vP "gen|[Mm]ock[s]?" >> $(COVER_ROOT)/cover.out
351+
cat $(INTEG_NDC_COVER_FILE_POSTGRES) | grep -v "^mode: \w\+" | grep -vP "gen|[Mm]ock[s]?" >> $(COVER_ROOT)/cover.out
352352

353353
cover: $(COVER_ROOT)/cover.out
354354
go tool cover -html=$(COVER_ROOT)/cover.out;

client/admin/thriftClient.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,9 @@ import (
2525

2626
"go.uber.org/yarpc"
2727

28-
"github.com/uber/cadence/.gen/go/admin/adminserviceclient"
2928
"github.com/uber/cadence/common/types"
3029
"github.com/uber/cadence/common/types/mapper/thrift"
30+
"github.com/uber/cadence/gen/go/admin/adminserviceclient"
3131
)
3232

3333
type thriftClient struct {

client/clientfactory.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,6 @@ import (
2525

2626
"go.uber.org/yarpc"
2727

28-
"github.com/uber/cadence/.gen/go/admin/adminserviceclient"
29-
"github.com/uber/cadence/.gen/go/cadence/workflowserviceclient"
30-
"github.com/uber/cadence/.gen/go/history/historyserviceclient"
31-
"github.com/uber/cadence/.gen/go/matching/matchingserviceclient"
3228
"github.com/uber/cadence/client/admin"
3329
"github.com/uber/cadence/client/frontend"
3430
"github.com/uber/cadence/client/history"
@@ -38,6 +34,10 @@ import (
3834
"github.com/uber/cadence/common/membership"
3935
"github.com/uber/cadence/common/metrics"
4036
"github.com/uber/cadence/common/service/dynamicconfig"
37+
"github.com/uber/cadence/gen/go/admin/adminserviceclient"
38+
"github.com/uber/cadence/gen/go/cadence/workflowserviceclient"
39+
"github.com/uber/cadence/gen/go/history/historyserviceclient"
40+
"github.com/uber/cadence/gen/go/matching/matchingserviceclient"
4141
)
4242

4343
const (

client/frontend/thriftClient.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,9 @@ import (
2525

2626
"go.uber.org/yarpc"
2727

28-
"github.com/uber/cadence/.gen/go/cadence/workflowserviceclient"
2928
"github.com/uber/cadence/common/types"
3029
"github.com/uber/cadence/common/types/mapper/thrift"
30+
"github.com/uber/cadence/gen/go/cadence/workflowserviceclient"
3131
)
3232

3333
type thriftClient struct {

client/history/thriftClient.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,9 @@ import (
2525

2626
"go.uber.org/yarpc"
2727

28-
"github.com/uber/cadence/.gen/go/history/historyserviceclient"
2928
"github.com/uber/cadence/common/types"
3029
"github.com/uber/cadence/common/types/mapper/thrift"
30+
"github.com/uber/cadence/gen/go/history/historyserviceclient"
3131
)
3232

3333
type thriftClient struct {

client/matching/thriftClient.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,9 @@ import (
2525

2626
"go.uber.org/yarpc"
2727

28-
"github.com/uber/cadence/.gen/go/matching/matchingserviceclient"
2928
"github.com/uber/cadence/common/types"
3029
"github.com/uber/cadence/common/types/mapper/thrift"
30+
"github.com/uber/cadence/gen/go/matching/matchingserviceclient"
3131
)
3232

3333
type thriftClient struct {

cmd/tools/copyright/licensegen.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@ func hasCopyright(f *os.File) (bool, error) {
234234
}
235235

236236
func isFileAutogenerated(path string) bool {
237-
return strings.HasPrefix(path, ".gen")
237+
return strings.HasPrefix(path, "gen")
238238
}
239239

240240
func mustProcessPath(path string) bool {

common/checksum/crc_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ import (
2929
"github.com/pborman/uuid"
3030
"github.com/stretchr/testify/assert"
3131

32-
"github.com/uber/cadence/.gen/go/shared"
3332
"github.com/uber/cadence/common"
33+
"github.com/uber/cadence/gen/go/shared"
3434
)
3535

3636
func TestCRC32OverThrift(t *testing.T) {

common/codec/version0Thriftrw_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ import (
2727

2828
"github.com/stretchr/testify/suite"
2929

30-
workflow "github.com/uber/cadence/.gen/go/shared"
30+
workflow "github.com/uber/cadence/gen/go/shared"
3131
)
3232

3333
type (

common/convert.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ import (
2525

2626
"go.uber.org/cadence/.gen/go/shared"
2727

28-
s "github.com/uber/cadence/.gen/go/shared"
28+
s "github.com/uber/cadence/gen/go/shared"
2929
)
3030

3131
// IntPtr makes a copy and returns the pointer to an int.

0 commit comments

Comments
 (0)