Skip to content

Commit f2633ee

Browse files
Fix mapping of well-known types when compiling a FileDescriptionSet
Respect the recently added `Builder::with_extended_rust_types` when compiling a `FileDescriptionSet` via e.g. `Builder::compile_fds` or `Builder::compile_fds_with_config`. When `with_extended_rust_types` was added, only the code paths compiling .proto files from source were updated to include the extended mappings of well-known types.
1 parent 21d2494 commit f2633ee

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

tonic-prost-build/src/lib.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -863,6 +863,10 @@ impl Builder {
863863
config.include_file(path);
864864
}
865865

866+
if self.with_extended_rust_types {
867+
NON_PATH_TYPE_ALLOWLIST.set(EXTENDED_NON_PATH_TYPE_ALLOWLIST);
868+
}
869+
866870
// Note: We don't pass self.disable_comments to prost Config here
867871
// because those are meant for service/method paths which are handled
868872
// by the ServiceGenerator, not for message paths

0 commit comments

Comments
 (0)