Skip to content

Commit

Permalink
proto,scripts(ticdc): generate protobuf with gogofaster (pingcap#5257)
Browse files Browse the repository at this point in the history
  • Loading branch information
overvenus authored Apr 27, 2022
1 parent bc1c72d commit 8cbf453
Show file tree
Hide file tree
Showing 9 changed files with 387 additions and 621 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -64,3 +64,5 @@ dm/ui/stats.html
# npm dependencies
node_modules

tools/bin
tools/include
11 changes: 9 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ kafka_consumer:
install:
go install ./...

unit_test: check_failpoint_ctl generate_mock generate-msgp-code
unit_test: check_failpoint_ctl generate_mock generate-msgp-code generate-protobuf
mkdir -p "$(TEST_DIR)"
$(FAILPOINT_ENABLE)
@export log_level=error;\
Expand Down Expand Up @@ -167,7 +167,7 @@ integration_test_mysql:
integration_test_kafka: check_third_party_binary
tests/integration_tests/run.sh kafka "$(CASE)" "$(START_AT)"

fmt: tools/bin/gofumports tools/bin/shfmt generate_mock generate-msgp-code
fmt: tools/bin/gofumports tools/bin/shfmt generate_mock generate-msgp-code generate-protobuf
@echo "gofmt (simplify)"
tools/bin/gofumports -l -w $(FILES) 2>&1 | $(FAIL_ON_STDOUT)
@echo "run shfmt"
Expand Down Expand Up @@ -213,6 +213,10 @@ generate-msgp-code: tools/bin/msgp
@echo "generate-msgp-code"
./scripts/generate-msgp-code.sh

generate-protobuf: tools/bin/protoc tools/bin/protoc-gen-gogofaster
@echo "generate-protobuf"
./scripts/generate-protobuf.sh

vet:
@echo "vet"
$(GO) vet $(PACKAGES) 2>&1 | $(FAIL_ON_STDOUT)
Expand Down Expand Up @@ -452,6 +456,9 @@ tools/bin/swag: tools/check/go.mod
tools/bin/msgp: tools/check/go.mod
cd tools/check && $(GO) build -mod=mod -o ../bin/msgp github.com/tinylib/msgp

tools/bin/protoc:
./scripts/download-protoc.sh

check_failpoint_ctl: tools/bin/failpoint-ctl

failpoint-enable: check_failpoint_ctl
Expand Down
177 changes: 56 additions & 121 deletions proto/benchmark/CraftBenchmark.pb.go

Large diffs are not rendered by default.

313 changes: 91 additions & 222 deletions proto/canal/CanalProtocol.pb.go

Large diffs are not rendered by default.

245 changes: 79 additions & 166 deletions proto/canal/EntryProtocol.pb.go

Large diffs are not rendered by default.

11 changes: 0 additions & 11 deletions proto/generate-proto.sh

This file was deleted.

144 changes: 45 additions & 99 deletions proto/p2p/CDCPeerToPeer.pb.go

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

Loading

0 comments on commit 8cbf453

Please sign in to comment.