Fix #4656: Improve diagnostics for invalid proto files#72
Conversation
Signed-off-by: Arya Pratap Singh <notaryasingh@gmail.com>
|
@daneshk can you please review this |
@ARYPROGRAMMER Seems like we have duplicate methods. Shall we have one? |
Give me some time I'll just see once |
yeah saw that lgtm now |
|
@ARYPROGRAMMER I just went through the original code. We mistakenly duplicate whole |
yes absolutely we can do that. just check once my changes in few minutes |
Signed-off-by: Arya Pratap Singh <notaryasingh@gmail.com>
|
@daneshk i have did exactly what you wanted. let's see if this this you like it |
Signed-off-by: Arya Pratap Singh <notaryasingh@gmail.com>
|
@daneshk this should fix the checkstyle error |
protoc-core/src/main/java/io/ballerina/protoc/core/BalFileGenerationUtils.java
Outdated
Show resolved
Hide resolved
Signed-off-by: Arya Pratap Singh <notaryasingh@gmail.com>
|
really worked hard on this, glad to contribute - hope this time everything is resolved |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #72 +/- ##
============================================
+ Coverage 84.39% 86.40% +2.01%
+ Complexity 656 655 -1
============================================
Files 57 56 -1
Lines 3312 3243 -69
Branches 376 361 -15
============================================
+ Hits 2795 2802 +7
+ Misses 414 338 -76
Partials 103 103 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
let me know if anything needed here, thanks @daneshk |
|
can this be merged today @daneshk |
|
@ARYPROGRAMMER Thanks for the contribution. |
Fixes ballerina-platform/ballerina-library#4656 - Improves error diagnostics when bal grpc command processes invalid proto files.
Problem: When processing invalid proto files, the command crashed with unhelpful IOException: Stream closed errors instead of displaying the actual protoc compiler error messages.
Root Cause: The handleProcessExecutionErrors() method was checking the process exit value before reading the error stream, causing the stream to close prematurely.
Solution:
Examples
Before (Bad):
After
Test Cases
Checklist