refactor(internal/sidekick/rust): generate convert as top level module - #7531
Merged
Merged
Conversation
…ule instead of injecting via build.rs
Contributor
Author
|
Regenerated code: googleapis/google-cloud-rust#6747 |
Contributor
There was a problem hiding this comment.
Code Review
This pull request refactors the Rust code generation for hybrid crates by replacing the convert-include-package configuration with a more flexible include-file option and introducing a customizable prost-path parameter. It also cleans up the template-based code generation by removing the post-processing step in build.rs and conditionally compiling the convert module. The review feedback highlights potential syntax errors (such as double colons ::::) in the generated Rust code when the package name is empty, suggesting conditional checks in both the Go generator and the Mustache template to handle empty package names gracefully.
dbolduc
approved these changes
Sep 10, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This removes the hacking of the build script to modify includes.rs to add the convert module. This adds a use statement to bring the crate local proto types into scope.
An unexpected benefit is that the generated code for convert.rs is now also formatted.