fix(protoc-gen-elixir-grpc): leading slash in generated file paths#53
Conversation
When a proto file had no package directory, the generated output path began with a stray "/" (e.g. "/simple.server.pb.ex"). Build the path by appending the filename to pathParts before joining, so the result is a clean relative path. Also document that Buf's top-level `clean: true` will delete the plugin's `out` directory before generation, and recommend pointing `out` at a generated-only directory to avoid losing hand-written handlers. Signed-off-by: Yordis Prieto <yordis.prieto@gmail.com>
PR SummaryLow Risk Overview Adds Buf Tests now expect relative paths without a leading slash. Reviewed by Cursor Bugbot for commit f8480c3. Bugbot is set up for automated code reviews on this repo. Configure here. |
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (3)
WalkthroughThis PR updates Buf generator guidance for ChangesBuf output path handling
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
✨ Finishing Touches📝 Generate docstrings
🧪 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 |
When a proto file had no package directory, the generated output path
began with a stray "/" (e.g. "/simple.server.pb.ex"). Build the path
by appending the filename to pathParts before joining, so the result
is a clean relative path.
Also document that Buf's top-level
clean: truewill delete theplugin's
outdirectory before generation, and recommend pointingoutat a generated-only directory to avoid losing hand-writtenhandlers.
Signed-off-by: Yordis Prieto yordis.prieto@gmail.com