From 5627c86cfcda4fc0ad663ec87a423cc7979875b8 Mon Sep 17 00:00:00 2001 From: dilanSachi Date: Tue, 16 May 2023 17:24:47 +0530 Subject: [PATCH 1/4] Update version --- gradle.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle.properties b/gradle.properties index db0b525..3b44a57 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,6 +1,6 @@ org.gradle.caching=true group=io.ballerina -version=0.1.0-SNAPSHOT +version=0.1.1-SNAPSHOT #dependency versions ballerinaLangVersion=2201.5.0-20230404-105200-b8aec90e checkstylePluginVersion=8.18 From 5afeec12eb70e2e76d4d800a0e36ad03ebd935b3 Mon Sep 17 00:00:00 2001 From: dilanSachi Date: Tue, 16 May 2023 17:25:08 +0530 Subject: [PATCH 2/4] Fix requiring input when help command is added --- .../main/java/io/ballerina/protoc/protobuf/cmd/GrpcCmd.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/protoc-cli/src/main/java/io/ballerina/protoc/protobuf/cmd/GrpcCmd.java b/protoc-cli/src/main/java/io/ballerina/protoc/protobuf/cmd/GrpcCmd.java index afdb2da..cb72c6d 100644 --- a/protoc-cli/src/main/java/io/ballerina/protoc/protobuf/cmd/GrpcCmd.java +++ b/protoc-cli/src/main/java/io/ballerina/protoc/protobuf/cmd/GrpcCmd.java @@ -76,7 +76,7 @@ public class GrpcCmd implements BLauncherCmd { private CommandLine parentCmdParser; - @CommandLine.Option(names = {"-h", "--help"}, hidden = true) + @CommandLine.Option(names = {"-h", "--help"}, hidden = true, usageHelp = true) private boolean helpFlag; @CommandLine.Option(names = {"--input"}, description = "Input .proto file or a directory containing " + @@ -475,4 +475,8 @@ public void setMode(String mode) { public void setImportPath(String importPath) { this.importPath = importPath; } + + public void setHelpFlag(boolean helpFlag) { + this.helpFlag = helpFlag; + } } From e35df73bef4d1a2d5fb02bf523228377044c8279 Mon Sep 17 00:00:00 2001 From: dilanSachi Date: Tue, 16 May 2023 17:26:17 +0530 Subject: [PATCH 3/4] Remove setter method --- .../main/java/io/ballerina/protoc/protobuf/cmd/GrpcCmd.java | 4 ---- 1 file changed, 4 deletions(-) diff --git a/protoc-cli/src/main/java/io/ballerina/protoc/protobuf/cmd/GrpcCmd.java b/protoc-cli/src/main/java/io/ballerina/protoc/protobuf/cmd/GrpcCmd.java index cb72c6d..31a8d90 100644 --- a/protoc-cli/src/main/java/io/ballerina/protoc/protobuf/cmd/GrpcCmd.java +++ b/protoc-cli/src/main/java/io/ballerina/protoc/protobuf/cmd/GrpcCmd.java @@ -475,8 +475,4 @@ public void setMode(String mode) { public void setImportPath(String importPath) { this.importPath = importPath; } - - public void setHelpFlag(boolean helpFlag) { - this.helpFlag = helpFlag; - } } From 3c7293efd916bc64e2e07130123439389db871fb Mon Sep 17 00:00:00 2001 From: dilanSachi Date: Tue, 16 May 2023 17:31:25 +0530 Subject: [PATCH 4/4] Update changelog.md --- changelog.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/changelog.md b/changelog.md index 496aa3f..f68221e 100644 --- a/changelog.md +++ b/changelog.md @@ -5,5 +5,12 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## [Unreleased] + +### Fixed + +- [Fix required input error when `help` command is provided](https://github.com/ballerina-platform/ballerina-standard-library/issues/4446) + +## [0.1.0] - 2023-02-24 + ### Added - [Implement protobuf stub generation through protoc-tools](https://github.com/ballerina-platform/ballerina-standard-library/issues/3019)