Skip to content

Commit ccf980b

Browse files
authored
chore: Generate marshal/unmarshal with vtprotobuf (#1467)
1 parent 3415bdd commit ccf980b

File tree

4 files changed

+6222
-8
lines changed

4 files changed

+6222
-8
lines changed

Makefile

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,21 @@ mysqlsh:
3939
mysqlsh --sql --user root --password mysecretpassword --database dinotest 127.0.0.1:3306
4040

4141
# $ protoc --version
42-
# libprotoc 3.17.3
43-
# go install google.golang.org/protobuf/cmd/protoc-gen-go@latest
44-
proto:
45-
protoc -I ./protos --go_out=. --go_opt=module=github.com/kyleconroy/sqlc ./protos/**/*.proto
42+
# libprotoc 3.19.1
43+
# $ go install google.golang.org/protobuf/cmd/protoc-gen-go@latest
44+
# $ go install github.com/planetscale/vtprotobuf/cmd/protoc-gen-go-vtproto
45+
proto: internal/plugin/codegen.pb.go internal/python/ast/ast.pb.go
46+
47+
internal/plugin/codegen.pb.go: protos/plugin/codegen.proto
48+
protoc -I ./protos \
49+
--go_out=. \
50+
--go_opt=module=github.com/kyleconroy/sqlc \
51+
--go-vtproto_out=. \
52+
--go-vtproto_opt=module=github.com/kyleconroy/sqlc,features=marshal+unmarshal+size \
53+
./protos/plugin/codegen.proto
54+
55+
internal/python/ast/ast.pb.go: protos/python/ast.proto
56+
protoc -I ./protos \
57+
--go_out=. \
58+
--go_opt=module=github.com/kyleconroy/sqlc \
59+
./protos/python/ast.proto

internal/plugin/codegen.pb.go

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)