-
Notifications
You must be signed in to change notification settings - Fork 383
Description
Context
Base issue: #11225
Reference package path: microsoft.win32.registry
Roslyn-based GenAPI location: https://github.com/dotnet/sdk/tree/main/src/GenAPI/
Usage:
/repos/source-build-reference-packages]# ./generate.sh --pkg microsoft.extensions.logging,2.1.1 --genapi-backend roslyn --dest /repos/source-build-reference-packages/src/referencePackages/roslyn/
Steps:
- Generate SBRP package using SBRP generator with the roslyn-based backend
- Compare cci-based <-> roslyn-based reference assemblies
- Build the SBRP generated with the roslyn-based backend
- Collect issues, their occurrence, create bugs for each.
- Run the
sdk/ApiCompattool to compare generated API with original
How to compile project in SBRP
Use a docker or a VM and from root folder of source-build-reference-packages run:
/repos/source-build-reference-packages]# ./build.sh --projects ./build.sh --projects /repos/source-build-reference-packages/src/referencePackages/roslyn/system.memory/4.5.1/System.Memory.4.5.1.csproj
How to use the ApiCompat tool
sdk\artifacts\bin\Microsoft.DotNet.ApiCompat.Tool\Debug\net6.0> .\Microsoft.DotNet.ApiCompat.Tool.exe --strict-mode true --enable-rule-attributes-must-match true --enable-rule-cannot-change-parameter-name true --lref ... --rref ... -l ... -r ...
Found Issues:
Occurrence:
Microsoft.Extensions.Configuration.Abstractions: 5
Microsoft.Extensions.Configuration.Binder: 11
Microsoft.Extensions.DependencyInjection.Abstractions: 57
Microsoft.Extensions.Primitives: 1
Occurrence in Microsoft.Extensions.DependencyInjection.Abstractions: 2
public static partial class ActivatorUtilities
{
//...
- public static T CreateInstance<T>(System.IServiceProvider provider, object[] parameters) { throw null; }
+ public static T CreateInstance<T>(System.IServiceProvider provider, params object[] parameters) { throw null; }
//...
}Occurrence:
! Nullable is omitted from return type and parameters
System.Security.AccessControl: >10
System.Security.Principal.Windows: >10
+ public override System.Security.Principal.SecurityIdentifier? Owner { get { throw null; } set { } }
- public override Principal.SecurityIdentifier Owner { get { throw null; } set { } }+ protected internal delegate System.Exception? ExceptionFromErrorCode(int errorCode, string? name, System.Runtime.InteropServices.SafeHandle? handle, object? context);
- protected sealed override void Persist(string name, AccessControlSections includeSections) { }Occurrence in System.Security.Principal: 1
+ public new const string DefaultIssuer = "AD AUTHORITY";
-public static const string DefaultIssuer = "AD AUTHORITY";Occurrence: 8