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

Improve imports generation logic in gRPC tool #2762

Closed
madhukaw opened this issue Mar 7, 2022 · 0 comments · Fixed by ballerina-platform/module-ballerina-grpc#739
Closed
Assignees
Labels
module/grpc Points/2 Team/PCM Protocol connector packages related issues Type/Improvement

Comments

@madhukaw
Copy link
Contributor

madhukaw commented Mar 7, 2022

Description:

This has 2 sub-tasks.

  1. Print a warning message when there are unused imports in proto file

Currently when a user has defined a proto file with some unused imports, gRPC tool ignores those imports and generates the stub files only with the required imports. eg:

syntax = "proto3";

import "google/protobuf/wrappers.proto";
import "google/protobuf/timestamp.proto";

service helloWorld {
	rpc serverCall (google.protobuf.Timestamp) returns (stream google.protobuf.Timestamp);
}

We need to print a warning message mentioning such unused imports. eg:

import.proto:3:1: warning: Import google/protobuf/wrappers.proto but not used.
  1. Refactor imports generation logic as discussed in [1]

[1] ballerina-platform/module-ballerina-grpc#739 (comment)

@madhukaw madhukaw self-assigned this Mar 7, 2022
@madhukaw madhukaw added module/grpc Points/1 Team/PCM Protocol connector packages related issues Type/Improvement labels Mar 7, 2022
@madhukaw madhukaw changed the title Print a Warning message when there are unused imports in proto file Improve imports generation logic in gRPC tool Mar 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
module/grpc Points/2 Team/PCM Protocol connector packages related issues Type/Improvement
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant