Support well known types resolved by prost to their rust counterparts#2544
Merged
Conversation
LucioFranco
approved these changes
Mar 11, 2026
Member
|
not sure why CI isn't running 🤔 |
Contributor
Author
@LucioFranco updating seems to fix it. |
This was referenced Mar 17, 2026
Merged
LucioFranco
pushed a commit
that referenced
this pull request
May 7, 2026
## 🤖 New release * `tonic`: 0.14.5 -> 0.14.6 (✓ API compatible changes) * `tonic-build`: 0.14.5 -> 0.14.6 (✓ API compatible changes) * `tonic-prost`: 0.14.5 -> 0.14.6 (✓ API compatible changes) * `tonic-health`: 0.14.5 -> 0.14.6 (✓ API compatible changes) * `tonic-types`: 0.14.5 -> 0.14.6 (✓ API compatible changes) * `tonic-reflection`: 0.14.5 -> 0.14.6 (✓ API compatible changes) * `tonic-prost-build`: 0.14.5 -> 0.14.6 (✓ API compatible changes) * `tonic-web`: 0.14.5 -> 0.14.6 (✓ API compatible changes) <details><summary><i><b>Changelog</b></i></summary><p> ## `tonic` <blockquote> ## [0.14.6](tonic-v0.14.5...tonic-v0.14.6) - 2026-05-06 ### Added - *(transport/channel)* expose ServerCertVerifier API ([#2612](#2612)) ### Fixed - map no trailers ok status to unknown ([#2543](#2543)) ### Other - add max_frame_size to client Endpoint ([#2592](#2592)) - Allow setting the HTTP/2 client header table size ([#2582](#2582)) - update rust edition and version to 2024 and 1.88, respectively ([#2525](#2525)) </blockquote> ## `tonic-build` <blockquote> ## [0.14.6](tonic-build-v0.14.5...tonic-build-v0.14.6) - 2026-05-06 ### Other - update rust edition and version to 2024 and 1.88, respectively ([#2525](#2525)) </blockquote> ## `tonic-prost` <blockquote> ## [0.14.6](tonic-prost-v0.14.5...tonic-prost-v0.14.6) - 2026-05-06 ### Other - update rust edition and version to 2024 and 1.88, respectively ([#2525](#2525)) </blockquote> ## `tonic-health` <blockquote> ## [0.14.6](tonic-health-v0.14.5...tonic-health-v0.14.6) - 2026-05-06 ### Other - update rust edition and version to 2024 and 1.88, respectively ([#2525](#2525)) </blockquote> ## `tonic-types` <blockquote> ## [0.14.6](tonic-types-v0.14.5...tonic-types-v0.14.6) - 2026-05-06 ### Other - update rust edition and version to 2024 and 1.88, respectively ([#2525](#2525)) </blockquote> ## `tonic-reflection` <blockquote> ## [0.14.6](tonic-reflection-v0.14.5...tonic-reflection-v0.14.6) - 2026-05-06 ### Other - fix panic when client drops connection early ([#2596](#2596)) - update rust edition and version to 2024 and 1.88, respectively ([#2525](#2525)) </blockquote> ## `tonic-prost-build` <blockquote> ## [0.14.6](tonic-prost-build-v0.14.5...tonic-prost-build-v0.14.6) - 2026-05-06 ### Other - Support well known types resolved by prost to their rust counterparts ([#2544](#2544)) - update rust edition and version to 2024 and 1.88, respectively ([#2525](#2525)) </blockquote> ## `tonic-web` <blockquote> ## [0.14.6](tonic-web-v0.14.5...tonic-web-v0.14.6) - 2026-05-06 ### Other - update rust edition and version to 2024 and 1.88, respectively ([#2525](#2525)) </blockquote> </p></details> --- This PR was generated with [release-plz](https://github.com/release-plz/release-plz/). Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
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.
Motivation
Solves issue #2526.
Solution
This PR adds a new constant,
EXTENDED_NON_PATH_TYPE_ALLOWLIST, that supports every rust primitive that can be returned by prost when a well known is found. This constant should be used instead ofDEFAULT_NON_PATH_TYPE_ALLOWLISTto successfully compile protos that use well-known types in requests and responses.To make this behavior optional a new flag,
with_extended_rust_types, is introduced. Due to interface limitations this flag can not threaded intoprost-build, instead a thread local is used.