diff --git a/.github/workflows/ci-workflow.yml b/.github/workflows/ci-workflow.yml index c9549323..8a22068f 100644 --- a/.github/workflows/ci-workflow.yml +++ b/.github/workflows/ci-workflow.yml @@ -7,11 +7,9 @@ on: jobs: build_and_test: - name: pb-${{ matrix.protobuf_version }} + name: make buildserverall runs-on: ubuntu-latest strategy: - matrix: - protobuf_version: [3.19.4] fail-fast: false steps: - name: Checkout branch @@ -21,15 +19,6 @@ jobs: uses: actions/setup-go@v5 with: go-version: 1.19 - - - name: Setup protoc - env: - PROTOBUF_VERSION: ${{ matrix.protobuf_version }} - run: ./install-protobuf.sh - - - name: Protoc version - run: PATH=$HOME/bin:$PATH protoc --version - + - uses: arduino/setup-protoc@v1 - name: Build server allgo version - - run: PATH=$HOME/bin:$PATH make buildserverall + run: make buildserverall diff --git a/CHANGELOG.md b/CHANGELOG.md index d03a18b0..eba6cd33 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,10 @@ ## Unreleased +## [v1.6.0](https://github.com/cosmos/gogoproto/releases/tag/v1.6.0) - 2024-08-08 + +- [#142](https://github.com/cosmos/gogoproto/pull/142) Update code generator to make grpc `ServiceDesc` public. + ## [v1.5.0](https://github.com/cosmos/gogoproto/releases/tag/v1.5.0) - 2024-06-05 ### Improvements diff --git a/install-protobuf.sh b/install-protobuf.sh deleted file mode 100755 index 90178635..00000000 --- a/install-protobuf.sh +++ /dev/null @@ -1,28 +0,0 @@ -#!/usr/bin/env bash - -set -ex - -die() { - echo "$@" >&2 - exit 1 -} - -cd ${HOME} - -case "$PROTOBUF_VERSION" in -2*) - basename=protobuf-$PROTOBUF_VERSION - wget https://github.com/google/protobuf/releases/download/v$PROTOBUF_VERSION/$basename.tar.gz - tar xzf $basename.tar.gz - cd protobuf-$PROTOBUF_VERSION - ./configure --prefix=${HOME} && make -j2 && make install - ;; -3*) - basename=protoc-$PROTOBUF_VERSION-linux-x86_64 - wget https://github.com/google/protobuf/releases/download/v$PROTOBUF_VERSION/$basename.zip - unzip $basename.zip - ;; -*) - die "unknown protobuf version: $PROTOBUF_VERSION" - ;; -esac diff --git a/protoc-gen-gogo/grpc/grpc.go b/protoc-gen-gogo/grpc/grpc.go index 1b5dad61..2cec8f88 100755 --- a/protoc-gen-gogo/grpc/grpc.go +++ b/protoc-gen-gogo/grpc/grpc.go @@ -243,6 +243,7 @@ func (g *grpc) generateService(file *generator.FileDescriptor, service *pb.Servi } // Service descriptor. + g.P("var ", strings.TrimPrefix(serviceDescVar, "_"), " = ", serviceDescVar) g.P("var ", serviceDescVar, " = ", grpcPkg, ".ServiceDesc {") g.P("ServiceName: ", strconv.Quote(fullServName), ",") g.P("HandlerType: (*", serverType, ")(nil),")