mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-27 15:16:43 +00:00
Protobuf tooling fix and upgrade (#313)
* Protobuf tooling fix and upgrade * Paths for protobuf files has changed, reflect that in Makefile * Fix the tooling to make it work in macos * Update protoc version and regenarate files. * Regen proto
This commit is contained in:
parent
0232c6a266
commit
b416577a8e
5 changed files with 288 additions and 282 deletions
2
Makefile
2
Makefile
|
|
@ -22,7 +22,7 @@ bor-all:
|
|||
cp $(GOBIN)/* $(GOPATH)/bin/
|
||||
|
||||
protoc:
|
||||
protoc --go_out=. --go-grpc_out=. ./command/server/proto/*.proto
|
||||
protoc --go_out=. --go-grpc_out=. ./internal/cli/server/proto/*.proto
|
||||
|
||||
geth:
|
||||
$(GORUN) build/ci.go install ./cmd/geth
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
|
|
@ -4,7 +4,7 @@ package proto;
|
|||
|
||||
import "google/protobuf/empty.proto";
|
||||
|
||||
option go_package = "/command/server/proto";
|
||||
option go_package = "/internal/cli/server/proto";
|
||||
|
||||
service Bor {
|
||||
rpc Pprof(PprofRequest) returns (stream PprofResponse);
|
||||
|
|
|
|||
|
|
@ -1,8 +1,4 @@
|
|||
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
||||
// versions:
|
||||
// - protoc-gen-go-grpc v1.2.0
|
||||
// - protoc v3.17.3
|
||||
// source: command/server/proto/server.proto
|
||||
|
||||
package proto
|
||||
|
||||
|
|
@ -409,5 +405,5 @@ var Bor_ServiceDesc = grpc.ServiceDesc{
|
|||
ServerStreams: true,
|
||||
},
|
||||
},
|
||||
Metadata: "command/server/proto/server.proto",
|
||||
Metadata: "internal/cli/server/proto/server.proto",
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,15 +1,24 @@
|
|||
#!/bin/bash
|
||||
|
||||
# Install protobuf
|
||||
PROTOC_ZIP=protoc-3.12.0-linux-x86_64.zip
|
||||
curl -OL https://github.com/protocolbuffers/protobuf/releases/download/v3.12.0/$PROTOC_ZIP
|
||||
if [[ "$OSTYPE" == "linux-gnu"* ]]; then
|
||||
os="linux"
|
||||
elif [[ "$OSTYPE" == "darwin"* ]]; then
|
||||
os="osx"
|
||||
else
|
||||
echo "Unsupported platform"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
PROTOC_ZIP=protoc-3.19.3-$os-x86_64.zip
|
||||
curl -OL https://github.com/protocolbuffers/protobuf/releases/download/v3.19.3/$PROTOC_ZIP
|
||||
sudo unzip -o $PROTOC_ZIP -d /usr/local bin/protoc
|
||||
sudo unzip -o $PROTOC_ZIP -d /usr/local 'include/*'
|
||||
rm -f $PROTOC_ZIP
|
||||
|
||||
# Change permissions to use the binary
|
||||
sudo chmod 755 -R /usr/local/bin/protoc
|
||||
sudo chmod 755 -R /usr/local/include
|
||||
sudo chmod -R 755 /usr/local/bin/protoc
|
||||
sudo chmod -R 755 /usr/local/include
|
||||
|
||||
# Install golang extensions (DO NOT CHANGE THE VERSIONS)
|
||||
go install google.golang.org/protobuf/cmd/protoc-gen-go@v1.25.0
|
||||
|
|
|
|||
Loading…
Reference in a new issue