wso2 / apk

Official Repository for APK distribution
Apache License 2.0
148 stars 89 forks source link

Proto parser has limitations (feature/grpc branch) #2374

Open DDH13 opened 1 month ago

DDH13 commented 1 month ago

Description: Handwritten parser for proto files in the config deployer has some limitations. It uses regex to match blocks surrounded by curly braces starting with the 'service' keyword to identify gRPC services and then the 'rpc' keyword to match gRPC methods. However, this may lead to issues in situations where nested curly braces exist. Furthermore, the basepath and version is also parsed from the package name of the proto file and an incorrectly formatted package name might cause issues. An alternative method for parsing would to be modify the parser to take in proto files that are already compiled using the standard proto-compiler and then use the standard libraries to extract the relevant information.