Skip to content

Commit 5312ce8

Browse files
authored
feat: make serviceDesc public (#142)
1 parent 0923950 commit 5312ce8

File tree

4 files changed

+8
-42
lines changed

4 files changed

+8
-42
lines changed

.github/workflows/ci-workflow.yml

+3-14
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,9 @@ on:
77

88
jobs:
99
build_and_test:
10-
name: pb-${{ matrix.protobuf_version }}
10+
name: make buildserverall
1111
runs-on: ubuntu-latest
1212
strategy:
13-
matrix:
14-
protobuf_version: [3.19.4]
1513
fail-fast: false
1614
steps:
1715
- name: Checkout branch
@@ -21,15 +19,6 @@ jobs:
2119
uses: actions/setup-go@v5
2220
with:
2321
go-version: 1.19
24-
25-
- name: Setup protoc
26-
env:
27-
PROTOBUF_VERSION: ${{ matrix.protobuf_version }}
28-
run: ./install-protobuf.sh
29-
30-
- name: Protoc version
31-
run: PATH=$HOME/bin:$PATH protoc --version
32-
22+
- uses: arduino/setup-protoc@v1
3323
- name: Build server allgo version
34-
35-
run: PATH=$HOME/bin:$PATH make buildserverall
24+
run: make buildserverall

CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22

33
## Unreleased
44

5+
## [v1.6.0](https://github.com/cosmos/gogoproto/releases/tag/v1.6.0) - 2024-08-08
6+
7+
- [#142](https://github.com/cosmos/gogoproto/pull/142) Update code generator to make grpc `ServiceDesc` public.
8+
59
## [v1.5.0](https://github.com/cosmos/gogoproto/releases/tag/v1.5.0) - 2024-06-05
610

711
### Improvements

install-protobuf.sh

-28
This file was deleted.

protoc-gen-gogo/grpc/grpc.go

+1
Original file line numberDiff line numberDiff line change
@@ -243,6 +243,7 @@ func (g *grpc) generateService(file *generator.FileDescriptor, service *pb.Servi
243243
}
244244

245245
// Service descriptor.
246+
g.P("var ", strings.TrimPrefix(serviceDescVar, "_"), " = ", serviceDescVar)
246247
g.P("var ", serviceDescVar, " = ", grpcPkg, ".ServiceDesc {")
247248
g.P("ServiceName: ", strconv.Quote(fullServName), ",")
248249
g.P("HandlerType: (*", serverType, ")(nil),")

0 commit comments

Comments
 (0)