Skip to content

Commit 0a7661b

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 a55efae commit 0a7661b

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
@@ -904,6 +904,10 @@ impl Builder {
904904
config.include_file(path);
905905
}
906906

907+
if self.with_extended_rust_types {
908+
NON_PATH_TYPE_ALLOWLIST.set(EXTENDED_NON_PATH_TYPE_ALLOWLIST);
909+
}
910+
907911
// Note: We don't pass self.disable_comments to prost Config here
908912
// because those are meant for service/method paths which are handled
909913
// by the ServiceGenerator, not for message paths

0 commit comments

Comments
 (0)