Releases: ch-robinson/dotnet-avro
3.3.0
This minor release improves surrogate schema selection when building record deserializers:
- Enum schema surrogates are now selected correctly regardless of whether the enum appears in an array, map, or union. Additionally, this behavior can now be customized via the new
CreateSurrogateSchema
method on the record deserializer builder case.
3.2.1
2.1.0
This minor release improves surrogate schema selection when building record deserializers:
- Enum schema surrogates are now selected correctly regardless of whether the enum appears in an array, map, or union. Additionally, this behavior can now be customized via the new
CreateSurrogateSchema
method on the record deserializer builder case.
2.0.6
4.0.1
This patch release mitigates a .NET Framework-specific issue:
- All async calls in Chr.Avro.Confluent are now made with
ConfigureAwait(continueOnCapturedContext: false)
. In previous releases, use of consumer/producer builder extension methods may have contributed to deadlocks in certain contexts.
4.0.0
This major release brings significant performance improvements and simplifies some of the code used to build serializers and deserializers. Most applications should be able to upgrade from 3.x versions without making any additional changes.
Breaking changes
-
The
BinaryDeserializer<T>
andBinarySerializer<T>
classes have been removed from the public API (#58). -
Case interfaces no longer rely on exceptions to control flow (#53). That (regrettable) change, introduced in 3.0.0, made debugging intolerably slow (#41) and has now been reversed.
-
The codec interfaces and the case interfaces used by the serde builders have been altered to support more efficient expression generation (#58). The binary serde builder interfaces have also changed slightly—
BuildDelegate
methods no longer include the optionalcache
parameter.
Bug fixes
- Prior to 4.0.0, some CLI validation errors caused unhandled exceptions. With this release, all validation errors should be handled consistently.
New features
-
Chr.Avro now supports serializing and deserializing
ArraySegment<T>
as well as all generic collection types inSystem.Collections.Generic
andSystem.Collections.Immutable
(#59, h/t @kingwill27; #64). See the mapping documentation for more details. -
dotnet avro generate
now supports reading schemas from standard input (#62). The documentation includes Bash and PowerShell examples.
3.2.0
This minor release improves support for "array"
and "record"
type mapping.
New features
-
An
"array"
value can now be deserialized to any type with a constructor that has a singleIEnumerable<T>
parameter (#42). This opens up compatibility with collection types likeHashSet<T>
. -
Similarly, a
"record"
value can now be deserialized to any type with a constructor that has matching parameters for each record field (#38).
3.1.0
This minor release adds some new features to improve schema generation and support advanced use cases.
New features
-
The
dotnet avro create
command now includes the--temporal-behavior
flag, which can be used to specify how schemas are created forDateTime
andDateTimeOffset
:$ dotnet avro create --type System.DateTime "string" $ dotnet avro create --type System.DateTime --temporal-behavior epochmilliseconds {"type":"long","logicalType":"timestamp-millis"}
Under the hood, this maps to the new
temporalBehavior
parameter on theSchemaBuilder
(#39, h/t @promontis). -
The union deserializer and serializer builder cases can now be extended to support polymorphic mapping and similar use cases (#43). Check out this new guide page for details.
3.0.0
This major release improves Chr.Avro’s extensibility, drops .NET Framework targets, and fixes some bugs. Most applications should be able to upgrade from 2.x versions without making any additional changes.
Breaking changes
-
Chr.Avro no longer targets .NET Framework 4.5.2. All class libraries exclusively target .NET Standard 2.0. (Framework 4.6.1 and higher are supported, but 4.7.2 and higher are recommended.)
-
Starting with 3.0.0, Chr.Avro packages are strong named. Accordingly, Chr.Avro.Confluent 3.0.0 requires Confluent.Kafka and Confluent.SchemaRegistry ≥ 1.2.0.
-
Chr.Avro.Json now uses System.Text.Json under the hood (#20). As a result, some interfaces have changed.
INewtonsoftJsonSchemaReader
andINewtonsoftJsonSchemaWriter
have been removed, andJsonElement
has replacedJToken
. -
The case interfaces used by the JSON reader and writer, the schema builder, the type resolver, and the serde builders have been improved (#26). These changes make it easier to create custom cases and improve the usefulness of exceptions.
-
When serializing to the
"decimal"
logical type, numbers will no longer be truncated based on precision (#14). This aligns Chr.Avro with the official Java implementation and reduces the complexity of serde operations. Numbers may still be truncated based on scale.
Bug fixes
-
Prior to 3.0.0,
DateTimeOffset
s created from local times didn’t round trip correctly (#29, h/t @russell-mcdaniel). -
Schemas built for flag enums now consider the enum’s underlying type (#27).
New features
-
Classes that extend
Schema
andLogicalType
have been unsealed to support applications that require custom schema metadata. -
Confluent.Kafka extension methods support
DependentProducerBuilder
(#30, h/t @woodlee and @promontis).
3.0.0-rc.1
Release 3.0.0-rc.1