fix(tonic-prost-build): avoid super::primitive for wrapper RPC types#2534
Closed
mingley wants to merge 9 commits intohyperium:masterfrom
Closed
fix(tonic-prost-build): avoid super::primitive for wrapper RPC types#2534mingley wants to merge 9 commits intohyperium:masterfrom
mingley wants to merge 9 commits intohyperium:masterfrom
Conversation
added 6 commits
March 3, 2026 12:53
Use input_proto_type/output_proto_type for google.protobuf detection and keep rust_type emission for already-resolved wrapper primitives from prost-build. Add a unit test that reproduces the super::bool regression shape and extend the wellknown compile fixture with BoolValue RPC coverage.
Map wrapper WKTs to primitives even when a dotted protobuf wrapper name is present, and add regression coverage for that legacy shape.
Extract google dotted-type mapping into a helper and flatten convert_type with early returns while preserving behavior.
…pper-super-primitive
…rimitive' into mingley/fix-wkt-wrapper-super-primitive
Author
|
Closing this out because upstream PR #2544 already merged the same issue family into I verified the overlap locally while resolving the branch conflict against current |
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.
Summary
tonic-prost-buildwrapper WKT RPC type generation by classifying google types frominput_proto_type/output_proto_type(not resolved Rust type fields).BoolValue -> bool,UInt32Value -> u32)tests/wellknownwrapper fixture coverage (BoolValue,BytesValue,DoubleValue,FloatValue,Int32Value,Int64Value,UInt32Value,UInt64Value,StringValue).Root Cause
This regressed in #2321 (
969408e, prost extraction).input_type/output_type.super::bool.Fix
request_response_name, classify withinput_proto_type/output_proto_type.bool,u32, etc.)Risk / Compatibility
tonic-prost-build.compile_well_known_types(true)behavior remains unchanged.Testing Done
cargo fmtcargo test -p tonic-prost-build -p wellknowncargo clippy -p tonic-prost-build -p wellknown --all-targets --all-features -- -D warningscargo test -p tonic-prost-build wrapper_typesReverse-dependency spot checks for crates depending on
tonic-prost-build:tonic-prost-build,codegen,examples,test-compile,compression,default_stubs,deprecated_methods,disable-comments,my_application,integration-tests,test_web,wellknown-compiled,wellknowninterop: locally blocked by macOS arm64 linker error intonic-protobuf-build; interop is covered in CI.Resolves
super::boolnot found insuper#2388Future Testing Enhancement (Follow-on)
compile_well_known_types(true)regression test intonic-prost-buildto explicitly lock that behavior for future refactors?