-
Notifications
You must be signed in to change notification settings - Fork 1
feat: add HTTP transcoding support and update tests #23
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
Conversation
PR SummaryAdds an
Written by Cursor Bugbot for commit c5dce2f. This will update automatically on new commits. Configure here. |
WalkthroughThis pull request adds HTTP transcoding support to the protoc-gen-elixir-grpc plugin through a new command-line flag, updates function signatures to thread the flag through the generation workflow, adds conditional logic to the generated server module, and extends test coverage with documentation. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes
Possibly related PRs
Poem
Pre-merge checks and finishing touches❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (1 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Signed-off-by: Yordis Prieto <yordis.prieto@gmail.com>
d74668d to
c5dce2f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (1)
cmd/protoc-gen-elixir-grpc/main_test.go (1)
328-377: Good coverage of combined options.This test validates that
http_transcodeandhandler_module_prefixwork together correctly, which is important for real-world usage.Consider adding a test for
http_transcode+package_prefixcombination for complete coverage, though the current tests provide good confidence in the implementation.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (3)
cmd/protoc-gen-elixir-grpc/README.md(1 hunks)cmd/protoc-gen-elixir-grpc/main.go(6 hunks)cmd/protoc-gen-elixir-grpc/main_test.go(5 hunks)
🔇 Additional comments (9)
cmd/protoc-gen-elixir-grpc/README.md (1)
38-96: Excellent documentation structure!The new configuration sections are well-organized and provide clear examples for users. The progression from individual options to combined usage is helpful, and the generated code samples match the test expectations.
cmd/protoc-gen-elixir-grpc/main_test.go (1)
175-224: Good test coverage for http_transcode flag.The test correctly validates the new flag behavior, checking both the generated file path and the presence of
http_transcode: truein the server module.cmd/protoc-gen-elixir-grpc/main.go (7)
56-58: Clean constant definition and usage update.The
httpTranscodeFlagconstant follows the existing naming pattern. The usage string is quite long but clearly documents the available flags.
115-119: Proper flag declaration.The boolean flag is correctly declared with a sensible default (false) that maintains backwards compatibility.
171-171: Parameter correctly threaded through generation workflow.The
httpTranscodeflag is properly dereferenced and passed togenerateElixirFile.
186-186: Function signature updated correctly.The signature change adds the
httpTranscodeparameter and maintains consistency with the call site.
200-200: Parameter forwarded to service generation.The flag is correctly passed through to
generateServiceModule.
210-210: Function signature extended appropriately.The signature accepts the
httpTranscodeparameter needed for conditional output generation.
215-219: Clean conditional output generation.The logic correctly appends
, http_transcode: trueto theuse GRPC.Serverstatement when the flag is enabled. The implementation produces output that matches the test expectations and maintains proper formatting.
No description provided.