Conversation
|
Caution Review failedThe pull request is closed. WalkthroughIntroduces a package_suffix flag and related logic to generate code into a suffixed sub-package, adjusts output paths/imports accordingly, updates generation conditions, and bumps SupportedEditionsMaximum to 2024. Tests are tightened to assert exact file names and add coverage for go_package_prefix deduplication. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
participant protoc as protoc
participant plugin as protoc-gen-connect-go-servicestruct
participant flags as FlagSet
participant gen as generateFile(...)
participant fs as Output (files)
protoc->>plugin: Invoke with parameters
plugin->>flags: Parse package_suffix (default "connect")
loop For each file
plugin->>gen: generateFile(plugin, file, packageSuffix)
alt file has services
gen->>gen: Validate suffix as Go identifier
alt suffix invalid
gen-->>plugin: Emit error, skip file
else suffix valid or empty
gen->>gen: Adjust Go package name and import path
gen->>fs: Create file with suffixed filename/prefix
gen->>fs: Write header, package decl, imports, service code
end
else no services
gen-->>plugin: Return without file generation
end
end
plugin-->>protoc: Generated files
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Poem
✨ Finishing touches
🧪 Generate unit tests
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (2)
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 |
4bedfb0 to
ba3bdb0
Compare
Signed-off-by: Yordis Prieto <yordis.prieto@gmail.com>
Signed-off-by: Yordis Prieto yordis.prieto@gmail.com