Skip to content
Draft
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
11 changes: 9 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,15 @@ install:

.PHONY: proto
proto:
ignite generate proto-go
PATH="$$(go env GOPATH)/bin:$$PATH" buf generate proto --template proto/buf.gen.pulsar.yaml
ignite generate proto-go --yes
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is because

The default Pulsar generation path currently does not handle these proto3 optional fields correctly. When protoc-gen-go-pulsar generated API files for:

and I need the optional field since this is ideomatic rust and my types were designed in rust

That gives us valid API .pb.go files for Orbis while keeping the existing Pulsar path for everything else.

PATH="$$(go env GOPATH)/bin:$$PATH" buf generate proto --template proto/buf.gen.pulsar.yaml \
--exclude-path proto/sourcehub/orbis/document.proto \
--exclude-path proto/sourcehub/orbis/ring.proto \
--exclude-path proto/sourcehub/orbis/tx.proto
PATH="$$(go env GOPATH)/bin:$$PATH" buf generate proto --template proto/buf.gen.orbis.optional.yaml \
--path proto/sourcehub/orbis/document.proto \
--path proto/sourcehub/orbis/ring.proto \
--path proto/sourcehub/orbis/tx.proto

.PHONY: test
test:
Expand Down
4,016 changes: 205 additions & 3,811 deletions api/sourcehub/bulletin/tx.pulsar.go

Large diffs are not rendered by default.

86 changes: 5 additions & 81 deletions api/sourcehub/bulletin/tx_grpc.pb.go

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

224 changes: 224 additions & 0 deletions api/sourcehub/orbis/document.pb.go

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

Loading
Loading