Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 10 additions & 9 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
export GOBIN=$(PWD)/bin
export PROTOBUF_ROOT=$(PWD)/_vendor/protobuf-21.12
export PROTOBUF_ROOT=$(PWD)/_vendor/protobuf-30.1
export PROTOC_PATH=$(PROTOBUF_ROOT)/protoc

.PHONY: install test gen-conformance gen-include gen-wkt genall bin/protoc-gen-go bin/protoc-gen-go-vtproto

Expand All @@ -9,10 +10,10 @@ bin/protoc-gen-go-vtproto:
go install -buildvcs=false -tags protolegacy ./cmd/protoc-gen-go-vtproto

bin/protoc-gen-go:
go install -tags protolegacy google.golang.org/protobuf/cmd/protoc-gen-go
go install -tags protolegacy google.golang.org/protobuf/cmd/protoc-gen-go@latest

gen-conformance: install
$(PROTOBUF_ROOT)/src/protoc \
$(PROTOC_PATH) \
--proto_path=$(PROTOBUF_ROOT) \
--go_out=conformance --plugin protoc-gen-go="${GOBIN}/protoc-gen-go" \
--go-vtproto_out=conformance --plugin protoc-gen-go-vtproto="${GOBIN}/protoc-gen-go-vtproto" \
Expand All @@ -28,15 +29,15 @@ gen-conformance: install
conformance/conformance.proto

gen-include: bin/protoc-gen-go
$(PROTOBUF_ROOT)/src/protoc \
$(PROTOC_PATH) \
--proto_path=include \
--go_out=include --plugin protoc-gen-go="${GOBIN}/protoc-gen-go" \
-I$(PROTOBUF_ROOT)/src \
github.com/planetscale/vtprotobuf/vtproto/ext.proto
mv include/github.com/planetscale/vtprotobuf/vtproto/*.go ./vtproto

gen-wkt: bin/protoc-gen-go-vtproto
$(PROTOBUF_ROOT)/src/protoc \
$(PROTOC_PATH) \
-I$(PROTOBUF_ROOT)/src \
--plugin protoc-gen-go-vtproto="${GOBIN}/protoc-gen-go-vtproto" \
--go-vtproto_out=. \
Expand All @@ -50,7 +51,7 @@ gen-wkt: bin/protoc-gen-go-vtproto
$(PROTOBUF_ROOT)/src/google/protobuf/struct.proto

gen-testproto: get-grpc-testproto gen-wkt-testproto install
$(PROTOBUF_ROOT)/src/protoc \
$(PROTOC_PATH) \
--proto_path=testproto \
--proto_path=include \
--go_out=. --plugin protoc-gen-go="${GOBIN}/protoc-gen-go" \
Expand All @@ -66,7 +67,7 @@ gen-testproto: get-grpc-testproto gen-wkt-testproto install
testproto/unsafe/unsafe.proto \
testproto/unique/unique.proto \
|| exit 1;
$(PROTOBUF_ROOT)/src/protoc \
$(PROTOC_PATH) \
--proto_path=testproto \
--proto_path=include \
--go_out=. --plugin protoc-gen-go="${GOBIN}/protoc-gen-go" \
Expand All @@ -78,7 +79,7 @@ gen-testproto: get-grpc-testproto gen-wkt-testproto install
|| exit 1;

get-grpc-testproto: install
$(PROTOBUF_ROOT)/src/protoc \
$(PROTOC_PATH) \
--proto_path=. \
--proto_path=include \
--go_out=. --plugin protoc-gen-go="${GOBIN}/protoc-gen-go" \
Expand All @@ -94,7 +95,7 @@ get-grpc-testproto: install
|| exit 1;

gen-wkt-testproto: install
$(PROTOBUF_ROOT)/src/protoc \
$(PROTOC_PATH) \
--proto_path=testproto \
--proto_path=include \
--go_out=. --plugin protoc-gen-go="${GOBIN}/protoc-gen-go" \
Expand Down
2 changes: 1 addition & 1 deletion conformance/conformance_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ func Test(t *testing.T) {
if !*execute || testing.Short() {
t.SkipNow()
}
binPath := filepath.Join(*protoRoot, "conformance", "conformance-test-runner")
binPath := filepath.Join(*protoRoot, "conformance_test_runner")
cmd := exec.Command(binPath,
// "--failure_list", "failing_tests.txt",
"--text_format_failure_list", "failing_tests_text_format.txt",
Expand Down
Loading