feat(sidekick/rust): add bigquery code gen#6322
Conversation
There was a problem hiding this comment.
Code Review
This pull request introduces support for generating a Rust BigQuery query builder, including new generation logic, field mapping, and a Mustache template. Feedback highlights a style guide violation regarding excessive blank lines, an incorrect template name in an error message, and a potential runtime panic due to an unsafe type assertion.
dbolduc
left a comment
There was a problem hiding this comment.
Look into using a simplified model instead of generating synthetic fields and I think most of the complexity is going to go away.
And you need tests for complicated algorithms.
dbolduc
left a comment
There was a problem hiding this comment.
Looks pretty good! I left suggestions to maybe generalize the template for all field types, but I am only like 60% sure it will work
alvarowolfx
left a comment
There was a problem hiding this comment.
thanks for the tips to improve the code, I addressed the comments with the latest commit. Now I need to add unit tests.
Allow setters template to be reused outside full message template. Split from #6322
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request introduces support for generating Rust BigQuery query builders by adding a new generation template, synthetic message builders, and corresponding unit tests. The code review identified critical issues regarding the generation of invalid Rust code due to using raw proto field names instead of Rust-formatted names in the templates. Additionally, the reviewer pointed out a bug in the module generation loop that prematurely terminates processing, redundant lookups, and a minor receiver consistency issue.
🤖 I have created a release *beep* *boop* --- ## [0.20.0](v0.19.0...v0.20.0) (2026-06-10) ### Features * **nodejs:** add a DefaultVersion field to NodeJSPackage ([#6358](#6358)) ([af3218f](af3218f)) * **sidekick/rust:** add bigquery code gen ([#6322](#6322)) ([a7846f5](a7846f5)) * **sidekick/swift:** non-string maps ([#6361](#6361)) ([2b6d7e4](2b6d7e4)) * **sidekick/swift:** support discovery-based modules ([#6351](#6351)) ([09ef5cf](09ef5cf)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
Towards googleapis/google-cloud-rust#5844