apache / incubator-graphar

An open source, standard data file format for graph data storage and retrieval.
https://graphar.apache.org/
Apache License 2.0
192 stars 40 forks source link

feat (format): Introduce buf #519

Closed SemyonSinchenko closed 2 weeks ago

SemyonSinchenko commented 2 weeks ago

Reason for this PR

Introduce using of buf-tool

What changes are included in this PR?

Actual changes are related to the following files:

Are these changes tested?

.

Are there any user-facing changes?

.

SemyonSinchenko commented 2 weeks ago

@acezen May you make a look please?

To generate files do the following:

  1. Install protoc if you don't have it: https://grpc.io/docs/protoc-installation/
  2. Install buf (>=1.32) if you don't have it: https://buf.build/docs/installation
  3. From the root of the project run buf generate

It creates:

  1. Java classes in maven-projects/info/src/main/java/org/apache/grarphar/info/proto
  2. Cpp classes in cpp/src/proto (I have no understanding where to place them, I'm not a cpp person and I need ur help here)
  3. Python files in pyspark/graphar_pyspark/proto
SemyonSinchenko commented 2 weeks ago

Using of buf v2 is questionable because it was introduced only in the latest version. Anyway, I see no benefits of v1 because we will need to migrate sooner or later

acezen commented 2 weeks ago

@acezen May you make a look please?

To generate files do the following:

  1. Install protoc if you don't have it: https://grpc.io/docs/protoc-installation/
  2. Install buf (>=1.32) if you don't have it: https://buf.build/docs/installation
  3. From the root of the project run buf generate

It creates:

  1. Java classes in maven-projects/info/src/main/java/org/apache/grarphar/info/proto
  2. Cpp classes in cpp/src/proto (I have no understanding where to place them, I'm not a cpp person and I need ur help here)
  3. Python files in pyspark/graphar_pyspark/proto

I think the cpp classes may puts to cpp/proto.

acezen commented 2 weeks ago

@acezen May you make a look please? To generate files do the following:

  1. Install protoc if you don't have it: https://grpc.io/docs/protoc-installation/
  2. Install buf (>=1.32) if you don't have it: https://buf.build/docs/installation
  3. From the root of the project run buf generate

It creates:

  1. Java classes in maven-projects/info/src/main/java/org/apache/grarphar/info/proto
  2. Cpp classes in cpp/src/proto (I have no understanding where to place them, I'm not a cpp person and I need ur help here)
  3. Python files in pyspark/graphar_pyspark/proto

I think the cpp classes may puts to cpp/proto.

Hi, Sem, I think we can merge this change and I would update the cpp related configuratio.