[ 
https://issues.apache.org/jira/browse/AVRO-4079?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17890068#comment-17890068
 ] 

Kalle Niemitalo commented on AVRO-4079:
---------------------------------------

I wondered if .NET Standard 2.1 could be dropped as well. There's no {{#if 
NETSTANDARD2_1}} or {{#if NETSTANDARD2_1_OR_GREATER}} in the source code. 
However, there are differences between {{lib/netstandard2.0/Avro.dll}} and 
{{lib/netstandard2.1/Avro.dll}} in Apache.Avro.1.12.0.nupkg:
 * [assembly: System.Runtime.Versioning.TargetFrameworkAttribute]
 * Microsoft.CodeAnalysis.EmbeddedAttribute and 
System.Runtime.CompilerServices.IsReadOnlyAttribute are embedded for 
netstandard2.0.
(IsReadOnlyAttribute is used only in the parameter of 
Avro.IO.JsonDecoder.MakeParser(in IList<JsonElement>).)
 * Compiler-generated {{get}} accessors of AvroDecimal.UnscaledValue and 
AvroDecimal.Scale have [System.Runtime.CompilerServices.IsReadOnlyAttribute] 
for netstandard2.1 only.
 * String.Split(char[]) is used on netstandard2.0. String.Split(char, 
StringSplitOptions) is used on netstandard2.1. The latter will be more 
efficient as no array is created.
 * Avro.Util.LogicalUnixEpochType<>.UnixEpochDateTime is copied before use on 
netstandard2.0, presumably because DateTime is not a readonly struct type there.
 * Array.Reverse(Array) is used on netstandard2.0. Array.Reverse<T>(T[]) is 
used on netstandard2.1.
 * Avro.IO.BinaryDecoder has separate implementations for netstandard2.0 and 
netstandard2.1.  The latter allocates fewer temporary array objects.

{{lib/netstandard2.1/Avro.dll}} therefore still looks useful for anyone using 
Avro on .NET Core 3.0 or 3.1, or .NET 5.0, even though those are no longer 
supported by Microsoft.

> Remove C# NET 3.1 and 5.0 support
> ---------------------------------
>
>                 Key: AVRO-4079
>                 URL: https://issues.apache.org/jira/browse/AVRO-4079
>             Project: Apache Avro
>          Issue Type: Improvement
>            Reporter: Zoltan Csizmadia
>            Priority: Minor
>              Labels: pull-request-available
>   Original Estimate: 24h
>          Time Spent: 20m
>  Remaining Estimate: 23h 40m
>
> NET Core 3.1 and 5.0 are EOL for a long time and Ubuntu 24.04 does not 
> support them. It is safe to remove them both, since they were keptt only for 
> testing.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to