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

Generate protobuf definition bal files using Syntax tree #1103

Closed
madhukaw opened this issue Mar 15, 2021 · 0 comments · Fixed by ballerina-platform/module-ballerina-grpc#199
Assignees
Labels
module/grpc Team/PCM Protocol connector packages related issues Type/Task

Comments

@madhukaw
Copy link
Contributor

Create a new Protocol Buffers definition file grpc_unary_blocking.proto and add the below service definition.

syntax = "proto3";
import "google/protobuf/wrappers.proto";
service HelloWorld {
	rpc hello (google.protobuf.StringValue)
			returns (google.protobuf.StringValue);
}

Run the command below in Ballerina tools distribution for stub generation.

ballerina grpc --input grpc_unary_blocking.proto  --output stubs

Actual output:

Downloading protoc executor file - protoc-3.9.1-osx-x86_64.exe
Download successfully completed. Executor file path - /var/folders/p8/hxg5f9kd2bj8svp8v12m9tj40000gn/T/protoc-3.9.1-osx-x86_64.exe
Successfully extracted library files.
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by com.github.jknack.handlebars.context.MemberValueResolver (file:/Library/Ballerina/distributions/ballerina-slalpha2/bre/lib/handlebars-4.0.6.jar) to method java.util.Collections$EmptyMap.isEmpty()
WARNING: Please consider reporting this to the maintainers of com.github.jknack.handlebars.context.MemberValueResolver
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
Successfully generated ballerina file.

Expected output:

Downloading protoc executor file - protoc-3.9.1-osx-x86_64.exe
Download successfully completed. Executor file path - /var/folders/p8/hxg5f9kd2bj8svp8v12m9tj40000gn/T/protoc-3.9.1-osx-x86_64.exe
Successfully extracted library files.
Successfully generated ballerina file.
@madhukaw madhukaw added module/grpc Type/Task Team/DIU Data, IO, and Util packages related issues labels Mar 15, 2021
@madhukaw madhukaw self-assigned this Mar 15, 2021
@chamil321 chamil321 added this to the Swan Lake Alpha5 milestone Apr 2, 2021
@madhukaw madhukaw changed the title Fix WARNING messages that appear during stub generation Generate protobuf definition bal files using Syntax tree Apr 6, 2021
@madhukaw madhukaw added Team/PCM Protocol connector packages related issues and removed Team/DIU Data, IO, and Util packages related issues labels Apr 21, 2021
@ldclakmal ldclakmal removed this from the Swan Lake Alpha5 milestone Apr 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
module/grpc Team/PCM Protocol connector packages related issues Type/Task
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants