Skip to content

feat: regenerate libraries using protobuf 33.2, and update generation script#5552

Draft
sofisl wants to merge 2 commits intomainfrom
updateProtocTo33.2
Draft

feat: regenerate libraries using protobuf 33.2, and update generation script#5552
sofisl wants to merge 2 commits intomainfrom
updateProtocTo33.2

Conversation

@sofisl
Copy link
Copy Markdown
Contributor

@sofisl sofisl commented Apr 28, 2026

Reran generation using protoc 33.2

This regeneration introduces a minor, non-breaking change to the from_stub function signature in generated client files across many services. The signature has been updated from:
pub fn from_stub<T>(stub: T) -> Self
to:
pub fn from_stub<T>(stub: impl Into<std::sync::Arc<T>>) -> Self

This provides more flexibility when creating clients from custom or mocked stubs in tests. Any type that can be converted into an Arc can now be passed directly, rather than requiring the caller to wrap it in an Arc manually.
The rest of the changes are metadata and comment cleanups (such as the removal of redundant /// Creates a new default instance. comments).

Fixes: googleapis/librarian#5283

@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 28, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 97.76%. Comparing base (615f139) to head (0f42b13).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #5552   +/-   ##
=======================================
  Coverage   97.75%   97.76%           
=======================================
  Files         218      218           
  Lines       49555    49555           
=======================================
+ Hits        48444    48445    +1     
+ Misses       1111     1110    -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@sofisl
Copy link
Copy Markdown
Contributor Author

sofisl commented Apr 28, 2026

FWIW, I had to re-add allow(missing-docs) to fix the build: 0f42b13. I asked jetski why this was removed by the protoc upgrade and it said:

In the template used for prost generation, located at build.rs.mustache, there is an explicit instruction to disable comments on line 38l. This tells prost-build to omit documentation comments for all generated types. If the previous version of the libraries had comments, they may have been generated by a different template or a version of the tool that did not have this line or ignored it.

I can't tell if the protoc upgrade is (accurately?) removing this, or if I'm using the wrong generation process.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

rust: upgrade protoc to v33.2

1 participant