Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow *.orion.pb.go files to access the exported-service-desc from *.pb.go #189

Merged

Conversation

cs-lexliu
Copy link
Contributor

@cs-lexliu cs-lexliu commented Sep 21, 2022

Add two execution parameters.
standalone-mode: Allow you to place *.orion.pb.go and *.pb.go into different folder.
exported-service-desc: Allow you to use the higher version (v1.20.0) of protoc-gen-go. Read go_package option from protobufs files.
In standalone mode, the external import path is getting from the go_package option.

Check protoc-gen-orion/testprotos/Makefile for the usage.

#186

…pb.go

Add two execution parameters.
standalone-mode: Allow you to place *.orion.pb.go and *.pb.go into different folder.
exported-service-desc: Allow you to use the higher version (v1.20.0) of protoc-gen-go.
Read go_package option from protobufs files.
In standalone mode, the external import path is getting from the go_package option.
@cs-lexliu cs-lexliu requested a review from a team as a code owner September 21, 2022 14:47
@codecov
Copy link

codecov bot commented Sep 21, 2022

Codecov Report

Merging #189 (25eb807) into master (053997a) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master     #189   +/-   ##
=======================================
  Coverage   57.97%   57.97%           
=======================================
  Files          13       13           
  Lines         564      564           
=======================================
  Hits          327      327           
  Misses        230      230           
  Partials        7        7           

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

benjaminheng
benjaminheng previously approved these changes Sep 22, 2022
protoc-gen-orion/orion.go Outdated Show resolved Hide resolved

import "google.golang.org/grpc"

var ExampleService_ServiceDesc grpc.ServiceDesc
Copy link
Contributor

@praveensanap praveensanap Sep 22, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@cs-lexliu Can you add this variable generated from protoc-gen-go
Which version of protoc-gen-go should be used to generate it?
because current version would generate _ExampleService_ServiceDesc.

Do we have to bump the version in shared-proto scripts?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let me create another PR to describe how to use the tool and supported grpc version for the tool

@cs-lexliu cs-lexliu merged commit b8e9942 into master Sep 27, 2022
@cs-lexliu cs-lexliu deleted the 186-support-exported-service-desc-without-refactoring branch September 27, 2022 02:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants