Skip to content

Latest commit

 

History

History
409 lines (263 loc) · 21.5 KB

CHANGELOG.md

File metadata and controls

409 lines (263 loc) · 21.5 KB

Changelog

All notable changes to this project will be documented in this file.

The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.

0.13.1 - 2024-04-03

Fixed

  • Fixed resolution of field types when the type name is the same as the field name (#99)

0.13.0 - 2024-02-07

Changed

  • The minimum supported rust version is now 1.70.0.
  • Updated the miette dependency to version 7.0.0.

0.12.0 - 2023-09-01

Changed

  • The minimum supported rust version is now 1.64.0.
  • Updated to prost 0.12.0
  • When adding files to a DescriptorPool, the library now validates that all referenced types are contained within the dependency files (including files imported using import public). Fixes #57.

0.11.5 - 2023-08-29

Added

0.11.4 - 2023-04-28

Changed

  • Monomorphised some code in DescriptorPool::add_* methods to reduce binary size. Thanks to @srijs for #40 and #41.
  • Source code info is now omitted from the built-in descriptors for well-known types. This reduces the binary size by around 100KB.

0.11.3 - 2023-04-11

Changed

  • Updated logos dependency to 0.13.0.

0.11.2 - 2023-04-09

Changed

  • Adjusted the Debug implementation for DescriptorError to be more concise and readable.

Fixed

  • Fixed parsing of group fields from text format. The field name must now match the type name of the group field.

0.11.1 - 2023-04-05

Added

0.11.0 - 2023-03-27

Added

Changed

  • Duplicate files are now always ignored when adding to a DescriptorPool (previously, the code would skip files with identical contents, but now it skips any file with the same name).
  • prost-reflect-derive Update syn requirement from 1.0.84 to 2.0.3
  • prost-reflect-build Breaking Renamed Builder::file_descriptor_expr to Builder::descriptor_pool.
  • prost-reflect-build Breaking Removed the default behaviour of looking for the file descriptor under crate::DESCRIPTOR_POOL. One of descriptor_pool or file_descriptor_pool_bytes must be set explicitly.

0.10.3 - 2023-03-20

Fixed

0.10.2 - 2023-02-17

Changed

  • Updated the base64 dependency to version 0.21.0.
  • If the json_name property for a field is unset, it will now be populated with the camel-cased field name (#5).

0.10.1 - 2023-01-07

Fixed

  • The path for repeated extension options now includes the array index (for consistency with the output of protoc).

0.10.0 - 2023-01-04

Added

  • Added the path() method to all descriptor types, which returns a path that can be used to get source code info by comparing against Location::path.
  • Added the options() method to all descriptor types, which returns a message containing the options defined for the descriptor, including custom options.
  • The uninterpreted_options field of options is now used to populate options if it is present.
    • Note that if the text-format feature flag is not enabled, then options set through the aggregate_value field will be ignored.
  • Added several new validation checks when constructing a DescriptorPool instance.
  • Added new file(), line() and column() methods to get more context information about errors.
  • When the miette feature is enabled, DescriptorError now implements Diagnostic. When source code is provided through DescriptorError::with_source_code, and span information is provided in FileDescriptorProto::source_code_info, then the error will have labels annotating relevant portions of the source.

Changed

  • The minimum supported rust version is now 1.60.0.
  • Breaking: The FileDescriptor::dependencies now returns all imported files, instead of just those imported with import public. The new public_dependencies method preserves the old behaviour (#19).
  • Breaking: The reflect-well-known-types feature flag has been removed, and the functionality is now always available.
  • Updated the base64 dependency to version 0.20.0.

0.9.2 - 2022-08-14

Added

0.9.1 - 2022-08-01

Fixed

  • Fixed docs build

0.9.0 - 2022-07-30

Added

  • Added MessageDescriptor::get_extension_by_full_name().

Changed

  • Updated to prost 0.11.0
  • When the serde feature is enabled, the functions in prost-types for parsing and formatting time types are now used. This removes the time dependency.
  • The minimum supported rust version is now 1.56.0.

0.8.1 - 2022-05-29

Added

  • Added the FileDescriptor API for inspecting individual protobuf files.
  • Added methods to MessageDescriptor to get child messages, enums and extensions.

0.8.0 - 2022-05-09

Added

  • DescriptorPool (formerly FileDescriptor) now supports adding individual FileDescriptorProto instances (#6).

Changed

  • Breaking: FileDescriptor has been renamed to DescriptorPool. (The name FileDescriptor may be used in a future release to provide an API for inspecting individual source files)
    • FileDescriptor::new has been renamed to DescriptorPool::from_file_descriptor_set.
    • FileDescriptor::file_descriptor_set has been replaced by DescriptorPool::file_descriptor_protos to allow for it containing multiple sets of descriptors.
    • The parent_file method on all descriptor types has been renamed to parent_pool.
    • The file_descriptor parameter of the ReflectMessage derive macro has been renamed to descriptor_pool.
    • The default value of the descriptor pool expression for prost-reflect-build is changed from crate::FILE_DESCRIPTOR to crate::DESCRIPTOR_POOL.

0.7.0 - 2022-04-03

Changed

  • Updated to version 0.10.0 of prost.

0.6.1 - 2022-02-27

Added

  • The public dependencies prost, prost-types and bytes are now re-exported from the crate root.

0.6.0 - 2022-02-20

Added

  • Added implementations of [ReflectMessage] for the google well-known types in prost-types, behind a feature flag reflect-well-known-types.

Changed

  • The minimum supported rust version is now 1.54.0.

0.5.7 - 2022-02-14

Added

  • Added file_descriptor_proto methods to descriptor types to access raw details about the file the object is defined in.

0.5.6 - 2022-02-03

Fixed

  • Fixed handling of enums with the allow_alias option (see #9).

0.5.5 - 2022-02-01

Added

  • Added MessageDescriptor::descriptor_proto and friends to get the raw prost_types representation of protobuf definitions.

0.5.4 - 2022-02-01

Changed

  • Replace chrono dependency with time for parsing and formatting RFC 3339 timestamps when the serde feature is enabled. This avoids security vulnerabilities RUSTSEC-2020-0071 and RUSTSEC-2020-0159 which are not yet patched in chrono.

0.5.3 - 2022-01-18

Fixed

  • The Cardinality enum is now exported. Thanks to @benesch for #4.

0.5.2 - 2022-01-09

Changed

  • DynamicMessage now stores all fields (normal, extensions, and unknown) in the same storage, reducing its footprint from 48 bytes to 40.

0.5.1 - 2022-01-05

Added

  • Added DynamicMessage::get_field_mut and friends for in-place modification of messages.

0.5.0 - 2022-01-05

Added

  • Extension fields are now decoded from their byte representation
  • Added APIs to get extensions for a given message.

Changed

  • DynamicMessage::get_extension no longer returns an option.

0.4.0 - 2022-01-04

Added

  • New helper method DynamicMessage::decode.
  • New APIs to get reserved names and fields for messages and enums
  • New descriptor APIs to inspect extension fields
  • New dynamic message APIs to get and set extension fields

Changed

  • Renamed SerializeOptions::emit_unpopulated_fields to SerializeOptions::skip_default_fields (note the meaning is inverted as well!).
  • DynamicMessage::{has_field,get_field,set_field,clear_field} now take a field descriptor instead of a number. Use the new _by_number variants for the old behavior.

Fixed

  • The library now passes the protobuf conformance tests. This uncovered a number of edge cases:

    • Fixed unpacked fields not accepting packed bytes
    • Unknown fields are now preserved and roundtripped.
    • Fixed default value for enums with negative values
    • When receiving multiple fields of a oneof in the byte representation, only the last is set.
    • Trailing zeros (e.g. 10.00) are now accepted when parsing integers from the JSON representation.
    • Fixed handling of null in JSON deserialization.
    • Deserialization of google.protobuf.NullValue now accepts the "NULL_VALUE" string.
    • Deserialization of floats from JSON now validates the value is in range.
    • Nonzero trailing bits are allowed when deserializing JSON bytes from base64.
    • Serialization of google.protobuf.FieldMask fails if the path cannot be roundtripped through camelCase.
    • google.protobuf.Duration uses a different number of trailing zeroes depending on the precision of the input.
    • JSON serialization of google.protobuf.Timestamp and google.protobuf.Duration fails if it is outside the allowed range.
    • Duplicate oneof fields is now an error during JSON deserialization
    • Extensions are roundtripped though JSON format

0.3.5 - 2022-01-02

Fixed

  • Fixed deserialization of negative durations

0.3.4 - 2022-01-01

Added

  • Added MessageDescriptor::map_entry_key_field and MessageDescriptor::map_entry_value_field to help with inspecting message types.
  • Added Value::is_valid_for_field to validate that value types are compatible with message fields.
  • DynamicMessage::set_value now asserts that the value type is compatible with the field type.

Fixed

  • Fixed FieldDescriptor::is_packed returning true for non-repeated fields.

0.3.3 - 2021-12-30

Added

  • Added support for JSON mapping of google.protobuf.Any.

0.3.2 - 2021-12-29

Added

  • Builder methods on SerializeOptions and DeserializeOptions are now const.

Fixed

  • Fixed a case where serialization could produce invalid JSON.

0.3.1 - 2021-12-29

Fixed

  • Fixed docs for ReflectMessage macro.

0.3.0 - 2021-12-29

Added

  • Added parent_message() method to MessageDescriptor and EnumDescriptor to support inspecting the structure of nested types.
  • Added package_name() method to MessageDescriptor, EnumDescriptor and ServiceDescriptor to determine which package they are defined in.
  • Added ReflectMessage trait for types which can identify themselves with a MessageDescriptor.
  • Added a derive macro which can be used as part of prost_build to generate ReflectMessage implementations.

Changed

  • Renamed merge_from_message to transcode_from and to_message to transcode_to.

0.2.0 - 2021-12-27

Added

  • Added support for serializing and deserializing with serde. By default the serialization format is the canonical JSON encoding.

0.1.0 - 2021-12-26

Added

  • Initial release, including support for inspecting message types at runtime.