Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

API diff between .NET 7 and .NET 8 #8921

Merged
merged 4 commits into from Nov 27, 2023
Merged

Conversation

carlossanlop
Copy link
Member

Repos area owners:

Libraries area owners:

  • @dotnet/area-system-runtime
  • @dotnet/area-system-buffers
  • @dotnet/area-system-codedom
  • @dotnet/area-system-collections
  • @dotnet/area-system-componentmodel
  • @dotnet/area-system-componentmodel-dataannotations
  • @dotnet/area-system-componentmodel-composition
  • System.Data: @ajcvickers @DavoudEshtehari @David-Engel @roji
  • @dotnet/area-system-diagnostics-activity
  • @dotnet/area-system-diagnostics-eventlog
  • System.Diagnostics.Metrics: @tommcdon @noahfalk
  • @dotnet/area-system-formats-asn1
  • @dotnet/area-system-globalization
  • @dotnet/area-system-io @tmds
  • @dotnet/area-system-io-compression
  • @dotnet/area-system-linq
  • System.Net: @dotnet/ncl
  • @dotnet/area-system-numerics
  • @dotnet/area-system-reflection
  • @dotnet/area-system-reflection-emit
  • @dotnet/area-system-reflection-metadata
  • @dotnet/area-system-resources
  • @dotnet/area-system-runtime-compilerservices
  • System.Runtime.InteropServices: @dotnet/interop-contrib
  • System.Runtime.InteropServices.Javascript: @lewing @pavelsavara
  • @dotnet/area-system-runtime-intrinsics
  • System.Runtime.Intrinsics.Wasm: @lewing @steveisok @thaystg @radical @akoeplinger @lambdageek
  • @dotnet/area-system-security
  • @dotnet/area-system-text-encoding
  • @dotnet/area-system-text-json
  • @dotnet/area-system-text-regularexpressions
  • System.Threading: @mangod9 @kouvel
  • @dotnet/area-system-threading-channels
  • @dotnet/area-system-threading-tasks
  • System.Transactions: @ajcvickers @roji
  • @dotnet/area-system-xml

Known api-diff tool issues:

  • The AsmDiff tool sometimes skips adding { or {}. Please provide a GitHub suggestion in this PR so I can correct it. arcade#10981
  • The AsmDiff tool shows APIs with decorating attribute changes as removed and re-added, instead of showing only the API. Please ignore this, it might be confusing but technically it's not incorrect. I have an issue to track this: arcade#13814

Copy link
Member

@adamsitnik adamsitnik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

System.IO, System.IO.Pipes and System.IO.MemoryMappedFiles LGTM 👍

Copy link
Member

@singhashish-wpf singhashish-wpf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wpf LGTM

Copy link
Member

@pavelsavara pavelsavara left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

System.Runtime.InteropServices.JavaScript LGTM

Copy link
Member

@roji roji left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

System.Data and System.Data.Common LGTM
For System.Data.SqlTypes, /cc @David-Engel

@@ -0,0 +1,78 @@
# System.Buffers.Binary
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

System.Buffers.Binary LGTM

Primarily adding support for Int128/UInt128, IntPtr/UIntPtr, and support for reversing endianness of entire spans.

CC. @dotnet/area-system-buffers

@@ -0,0 +1,13 @@
# System.Buffers.Text
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

System.Buffers.Text LGTM

CC. @dotnet/area-system-buffers

@@ -0,0 +1,26 @@
# System.Buffers
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

System.Buffers LGTM

Primarily the new SearchValues support

CC. @dotnet/area-system-buffers

@@ -0,0 +1,247 @@
# System.Numerics
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

System.Numerics LGTM

This is namely support for IUtf8SpanFormattable/IUtf8SpanParsable, an iterative Crc32C primitive, Lerp, DegreesToRadians, RadiansToDegrees, left-handed matrix creation functions, and removing the where T : struct contstraint from Vector<T> so it can more easily be used in generic contexts (this does not expand the set of supported T).

CC. @dotnet/area-system-numerics

@@ -0,0 +1,123 @@
# System.Runtime.CompilerServices
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

System.Runtime.CompilerServices LGTM

Namely new attributes to support language features and remove the need for the compiler to emit internal copies in every assembly. But also some changes to use ref readonly where applicable

CC. @dotnet/area-system-runtime-compilerservices

}
public static class Unsafe {
- public static bool AreSame<T>([AllowNullAttribute] ref T left, [AllowNullAttribute] ref T right);
+ public static bool AreSame<T>([AllowNullAttribute, RequiresLocationAttribute] ref T left, [AllowNullAttribute, RequiresLocationAttribute] ref T right);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@carlossanlop, [RequiresLocation] ref T should be emitted as ref readonly in the diff

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Opened an issue to track this request: dotnet/arcade#14238

+ public static void Write<T>(Span<byte> destination, in T value) where T : struct;
}
- public readonly struct NFloat : IAdditionOperators<NFloat, NFloat, NFloat>, IAdditiveIdentity<NFloat, NFloat>, IBinaryFloatingPointIeee754<NFloat>, IBinaryNumber<NFloat>, IBitwiseOperators<NFloat, NFloat, NFloat>, IComparable, IComparable<NFloat>, IComparisonOperators<NFloat, NFloat, bool>, IDecrementOperators<NFloat>, IDivisionOperators<NFloat, NFloat, NFloat>, IEqualityOperators<NFloat, NFloat, bool>, IEquatable<NFloat>, IExponentialFunctions<NFloat>, IFloatingPoint<NFloat>, IFloatingPointConstants<NFloat>, IFloatingPointIeee754<NFloat>, IFormattable, IHyperbolicFunctions<NFloat>, IIncrementOperators<NFloat>, ILogarithmicFunctions<NFloat>, IMinMaxValue<NFloat>, IModulusOperators<NFloat, NFloat, NFloat>, IMultiplicativeIdentity<NFloat, NFloat>, IMultiplyOperators<NFloat, NFloat, NFloat>, INumber<NFloat>, INumberBase<NFloat>, IParsable<NFloat>, IPowerFunctions<NFloat>, IRootFunctions<NFloat>, ISignedNumber<NFloat>, ISpanFormattable, ISpanParsable<NFloat>, ISubtractionOperators<NFloat, NFloat, NFloat>, ITrigonometricFunctions<NFloat>, IUnaryNegationOperators<NFloat, NFloat>, IUnaryPlusOperators<NFloat, NFloat> {
+ public readonly struct NFloat : IAdditionOperators<NFloat, NFloat, NFloat>, IAdditiveIdentity<NFloat, NFloat>, IBinaryFloatingPointIeee754<NFloat>, IBinaryNumber<NFloat>, IBitwiseOperators<NFloat, NFloat, NFloat>, IComparable, IComparable<NFloat>, IComparisonOperators<NFloat, NFloat, bool>, IDecrementOperators<NFloat>, IDivisionOperators<NFloat, NFloat, NFloat>, IEqualityOperators<NFloat, NFloat, bool>, IEquatable<NFloat>, IExponentialFunctions<NFloat>, IFloatingPoint<NFloat>, IFloatingPointConstants<NFloat>, IFloatingPointIeee754<NFloat>, IFormattable, IHyperbolicFunctions<NFloat>, IIncrementOperators<NFloat>, ILogarithmicFunctions<NFloat>, IMinMaxValue<NFloat>, IModulusOperators<NFloat, NFloat, NFloat>, IMultiplicativeIdentity<NFloat, NFloat>, IMultiplyOperators<NFloat, NFloat, NFloat>, INumber<NFloat>, INumberBase<NFloat>, IParsable<NFloat>, IPowerFunctions<NFloat>, IRootFunctions<NFloat>, ISignedNumber<NFloat>, ISpanFormattable, ISpanParsable<NFloat>, ISubtractionOperators<NFloat, NFloat, NFloat>, ITrigonometricFunctions<NFloat>, IUnaryNegationOperators<NFloat, NFloat>, IUnaryPlusOperators<NFloat, NFloat>, IUtf8SpanFormattable, IUtf8SpanParsable<NFloat> {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

NFloat LGTM.

Simply implementing the new APIs added to the generic math interfaces (utf8 parse/format, lerp, deg2rad, rad2deg, etc).

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

off topic, does NFloat deserve mention in https://learn.microsoft.com/en-us/dotnet/standard/native-interop/best-practices ? I had overlooked it, but it's seems like it's more niche than nint and nuint. Perhaps that doc ought to have a new table for mappings to Apple things like CGFloat.

@@ -0,0 +1,1352 @@
# System.Runtime.Intrinsics.Arm
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

System.Runtime.Intrinsics.Arm LGTM

Namely adding the [ConstantExpected] attribute, but also a few new APIs covering the multiple register load/store instructions.

CC. @dotnet/area-system-runtime-intrinsics

@@ -0,0 +1,482 @@
# System.Runtime.Intrinsics.Wasm
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

System.Runtime.Intrinsics.Wasm LGTM

CC. @dotnet/area-system-runtime-intrinsics, @radekdoulik

@@ -0,0 +1,1612 @@
# System.Runtime.Intrinsics.X86
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

System.Runtime.Intrinsics.X86 LGTM

This is the addition of the [ConstantExpected] attribute and the new AVX-512 surface area (Avx512F, Avx512BW, Avx512CD, Avx512DQ, Avx512Vbmi, etc).

CC. @dotnet/area-system-runtime-intrinsics

@@ -0,0 +1,974 @@
# System.Runtime.Intrinsics
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

System.Runtime.Intrinsics LGTM

This is namely the removal of the where T : struct constraint for easier use in generic contexts (this does not expand the set of supported T) and the addition of the Vector512<T> type

CC. @dotnet/area-system-runtime-intrinsics

@@ -0,0 +1,841 @@
# System
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

System LGTM

This is namely obsoleting binary-formatter APIs, but also various other additions such as implementing the new generic math APIs (utf8 parse/format, lerp, deg2rad, rad2deg, etc), addition of more throw helpers on ArgumentOutOfRangeException (ThrowIfZero, ThrowIfNegative, ThrowIfEqual, ThrowIfGreaterThan, etc), a number of new Span/ReadOnlySpan APIs for searching or finding data (ContainsAny, ContainsAnyExcept, CointainsAnyInRange, Count, IndexOfAny, IndexOfAnyExcept, LastIndexOf, Split, etc), and new Random APIs in the form of GetItems and Shuffle

CC. @dotnet/area-system-runtime

@tommcdon
Copy link
Member

tommcdon commented Nov 15, 2023

System.Diagnostics.Metrics

Adding @tarekgh

Copy link
Member

@eiriktsarpalis eiriktsarpalis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Collection and STJ namespaces LGTM.

Copy link

@David-Engel David-Engel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

System.Data.SqlTypes LGTM

``` diff
namespace System.Globalization {
public class CultureNotFoundException : ArgumentException {
- protected CultureNotFoundException(SerializationInfo info, StreamingContext context);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

protected CultureNotFoundException(SerializationInfo info, StreamingContext context);

Is this how to show diff for methods which got a new attributes?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unfortunately yes, it's weird, I know.

@kouvel
Copy link
Member

kouvel commented Nov 15, 2023

System.Threading LGTM

@tarekgh
Copy link
Member

tarekgh commented Nov 15, 2023

The following LGTM.

8.0.0_System.Diagnostics.Metrics.md
8.0.0_System.Globalization.md
8.0.0_System.md (Date/time stuff)
8.0.0_System.Text.md
8.0.0_Microsoft.Extensions.Configuration.md
8.0.0_Microsoft.Extensions.Configuration.Xml.md
8.0.0_Microsoft.Extensions.Diagnostics.Metrics.Configuration.md
8.0.0_Microsoft.Extensions.Diagnostics.Metrics.md
8.0.0_Microsoft.Extensions.Logging.Console.md
8.0.0_Microsoft.Extensions.Logging.md
8.0.0_Microsoft.Extensions.Primitives.md

@merriemcgaw
Copy link
Member

@JeremyKuhne @lonitra for WinForms.

@carlossanlop carlossanlop merged commit 788ae8c into dotnet:main Nov 27, 2023
3 checks passed
@carlossanlop carlossanlop deleted the ApiDiff7vs8 branch November 27, 2023 21:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet