Skip to content

Commit

Permalink
feat: make serviceDesc public (#142)
Browse files Browse the repository at this point in the history
  • Loading branch information
julienrbrt authored Aug 8, 2024
1 parent 0923950 commit 5312ce8
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 42 deletions.
17 changes: 3 additions & 14 deletions .github/workflows/ci-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
28 changes: 0 additions & 28 deletions install-protobuf.sh

This file was deleted.

1 change: 1 addition & 0 deletions protoc-gen-gogo/grpc/grpc.go
Original file line number Diff line number Diff line change
Expand Up @@ -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),")
Expand Down

0 comments on commit 5312ce8

Please sign in to comment.