Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GH-89: Add support for generating Flight related files #114

Closed
wants to merge 1 commit into from

Conversation

kou
Copy link
Member

@kou kou commented Sep 10, 2024

Fix GH-89

//go:generate protoc --experimental_allow_proto3_optional -I../../../format --go_out=./gen/flight --go-grpc_out=./gen/flight --go_opt=paths=source_relative --go-grpc_opt=paths=source_relative Flight.proto
//go:generate protoc --experimental_allow_proto3_optional -I../../../format --go_out=./gen/flight --go-grpc_out=./gen/flight --go_opt=paths=source_relative --go-grpc_opt=paths=source_relative FlightSql.proto
//go:generate protoc --experimental_allow_proto3_optional -I${APACHE_ARROW_FORMAT_DIR} --go_out=./gen/flight --go-grpc_out=./gen/flight --go_opt=paths=source_relative --go-grpc_opt=paths=source_relative Flight.proto
//go:generate protoc --experimental_allow_proto3_optional -I${APACHE_ARROW_FORMAT_DIR} --go_out=./gen/flight --go-grpc_out=./gen/flight --go_opt=paths=source_relative --go-grpc_opt=paths=source_relative FlightSql.proto
Copy link
Member Author

Choose a reason for hiding this comment

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

Can we move these protoc ... command lines to dev/sync_flight.sh and remove this file?

Copy link
Member

Choose a reason for hiding this comment

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

the standard way of handling things like this would be to utilize go generate to run the commands rather than a separate sync script (ideally). So I'd personally prefer keeping this file and the go:generate lines.

Copy link
Member

Choose a reason for hiding this comment

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

that said, it might be better to utilize buf instead see the links below on the substrait-go repo for how I did it there to reference and generate the protobuf from the .proto files in the substrait-io/substrait repo

https://github.com/substrait-io/substrait-go/blob/main/doc.go#L9
https://github.com/substrait-io/substrait-go/blob/main/buf.gen.yaml

Copy link
Member Author

Choose a reason for hiding this comment

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

OK. I withdraw this approach.

@kou
Copy link
Member Author

kou commented Sep 10, 2024

We should use buf.

@kou kou closed this Sep 10, 2024
@kou kou deleted the generate-flight branch September 10, 2024 02:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Migrate Flight and FlightSql Proto Gen
2 participants