From 532377397520ecdfeeb35d31b809f042120c7c78 Mon Sep 17 00:00:00 2001 From: yecol Date: Fri, 2 Aug 2024 17:03:32 +0800 Subject: [PATCH 1/5] add configuration to generate protos for Go. --- buf.gen.yaml | 3 +++ format/adjacent_list.proto | 1 + format/edge_info.proto | 1 + format/enums.proto | 1 + format/graph_info.proto | 1 + format/property_group.proto | 1 + format/vertex_info.proto | 1 + 7 files changed, 9 insertions(+) diff --git a/buf.gen.yaml b/buf.gen.yaml index 9c4a91eb2..ed363365f 100644 --- a/buf.gen.yaml +++ b/buf.gen.yaml @@ -30,4 +30,7 @@ plugins: # Cpp - remote: buf.build/protocolbuffers/cpp:v27.1 out: cpp/proto + # Go + - remote: buf.build/protocolbuffers/go + out: go/proto # Java code well be generated by maven plugin \ No newline at end of file diff --git a/format/adjacent_list.proto b/format/adjacent_list.proto index 8afb819e6..63d1c1395 100644 --- a/format/adjacent_list.proto +++ b/format/adjacent_list.proto @@ -22,6 +22,7 @@ syntax = "proto3"; package graphar; option java_multiple_files = true; option java_package = "org.apache.graphar.proto"; +option go_package = "./graphar"; import "enums.proto"; diff --git a/format/edge_info.proto b/format/edge_info.proto index 92bea800e..6d9b3e972 100644 --- a/format/edge_info.proto +++ b/format/edge_info.proto @@ -22,6 +22,7 @@ syntax = "proto3"; package graphar; option java_multiple_files = true; option java_package = "org.apache.graphar.proto"; +option go_package = "./graphar"; import "property_group.proto"; import "adjacent_list.proto"; diff --git a/format/enums.proto b/format/enums.proto index 9a132fe3d..35ea9f087 100644 --- a/format/enums.proto +++ b/format/enums.proto @@ -22,6 +22,7 @@ syntax = "proto3"; package graphar; option java_multiple_files = true; option java_package = "org.apache.graphar.proto"; +option go_package = "./graphar"; enum DataType { BOOL = 0; diff --git a/format/graph_info.proto b/format/graph_info.proto index 199a8dfcc..bb23bafca 100644 --- a/format/graph_info.proto +++ b/format/graph_info.proto @@ -22,6 +22,7 @@ syntax = "proto3"; package graphar; option java_multiple_files = true; option java_package = "org.apache.graphar.proto"; +option go_package = "./graphar"; import "vertex_info.proto"; import "edge_info.proto"; diff --git a/format/property_group.proto b/format/property_group.proto index bb3a70287..832062c7a 100644 --- a/format/property_group.proto +++ b/format/property_group.proto @@ -22,6 +22,7 @@ syntax = "proto3"; package graphar; option java_multiple_files = true; option java_package = "org.apache.graphar.proto"; +option go_package = "./graphar"; import "enums.proto"; diff --git a/format/vertex_info.proto b/format/vertex_info.proto index 0efcd278f..704916721 100644 --- a/format/vertex_info.proto +++ b/format/vertex_info.proto @@ -22,6 +22,7 @@ syntax = "proto3"; package graphar; option java_multiple_files = true; option java_package = "org.apache.graphar.proto"; +option go_package = "./graphar"; import "property_group.proto"; From 9fa64d01795b485b6945a3ed8eeace74be1376ac Mon Sep 17 00:00:00 2001 From: yecol Date: Fri, 2 Aug 2024 17:05:46 +0800 Subject: [PATCH 2/5] fix a typo. --- buf.gen.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/buf.gen.yaml b/buf.gen.yaml index ed363365f..524101ccf 100644 --- a/buf.gen.yaml +++ b/buf.gen.yaml @@ -33,4 +33,4 @@ plugins: # Go - remote: buf.build/protocolbuffers/go out: go/proto - # Java code well be generated by maven plugin \ No newline at end of file + # Java (disabled for buf): Code will be generated by maven plugin \ No newline at end of file From cafdf3cc4db4aec46cb0b987e0a464e09172584b Mon Sep 17 00:00:00 2001 From: yecol Date: Sat, 3 Aug 2024 10:14:55 +0800 Subject: [PATCH 3/5] add specific version. --- buf.gen.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/buf.gen.yaml b/buf.gen.yaml index 524101ccf..81aa48ea6 100644 --- a/buf.gen.yaml +++ b/buf.gen.yaml @@ -31,6 +31,6 @@ plugins: - remote: buf.build/protocolbuffers/cpp:v27.1 out: cpp/proto # Go - - remote: buf.build/protocolbuffers/go + - remote: buf.build/protocolbuffers/go:v1.27.1 out: go/proto # Java (disabled for buf): Code will be generated by maven plugin \ No newline at end of file From 7323ef7171b4bf9973642ad556fe1f7af802a3d6 Mon Sep 17 00:00:00 2001 From: yecol Date: Sat, 3 Aug 2024 10:39:39 +0800 Subject: [PATCH 4/5] changed version to v1.28.1 --- buf.gen.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/buf.gen.yaml b/buf.gen.yaml index 81aa48ea6..72fc822ff 100644 --- a/buf.gen.yaml +++ b/buf.gen.yaml @@ -30,7 +30,7 @@ plugins: # Cpp - remote: buf.build/protocolbuffers/cpp:v27.1 out: cpp/proto - # Go - - remote: buf.build/protocolbuffers/go:v1.27.1 + # Go: (caution for compatibility: the oldest available version of the plugin is v1.28.1) + - remote: buf.build/protocolbuffers/go:v1.28.1 out: go/proto # Java (disabled for buf): Code will be generated by maven plugin \ No newline at end of file From 4758295f499e781687e51587f9cf8b18330243d7 Mon Sep 17 00:00:00 2001 From: yecol Date: Sat, 3 Aug 2024 15:31:15 +0800 Subject: [PATCH 5/5] fixed to version 1.34.2. --- buf.gen.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/buf.gen.yaml b/buf.gen.yaml index 72fc822ff..6a5db28e4 100644 --- a/buf.gen.yaml +++ b/buf.gen.yaml @@ -30,7 +30,7 @@ plugins: # Cpp - remote: buf.build/protocolbuffers/cpp:v27.1 out: cpp/proto - # Go: (caution for compatibility: the oldest available version of the plugin is v1.28.1) - - remote: buf.build/protocolbuffers/go:v1.28.1 + # Go (Version compatibility: based on v27 as stated on https://github.com/protocolbuffers/protobuf-go/releases/tag/v1.34.2) + - remote: buf.build/protocolbuffers/go:v1.34.2 out: go/proto # Java (disabled for buf): Code will be generated by maven plugin \ No newline at end of file