xamarin-macios icon indicating copy to clipboard operation
xamarin-macios copied to clipboard

[dotnet] LinkAll 'LinkedAwayGenericTypeAsOptionalMemberInProtocol' fails

Open spouliot opened this issue 5 years ago • 1 comments

Steps to Reproduce

  1. Run Link all for dotnet

Expected Behavior

No failure

Actual Behavior

LinkedAwayGenericTypeAsOptionalMemberInProtocol fails.

Xamarin.iOS.dll still has the type. There's quite a few things that are not removed - just not sure which one is responsible yet...

Environment

main

Example Project (If Possible)

link all.csproj

spouliot avatar Apr 22 '21 01:04 spouliot

With ILLink (dotnet) the types mentioned (as Type) inside an attribute are marked. This makes it impossible to pass this test.

[ProtocolMember (IsRequired = false, IsProperty = false, IsStatic = false, Name = "ConfigureView", Selector = "configureViewForParameters:", ParameterType = new Type [] { typeof (global::Foundation.NSSet<global::Foundation.NSString>) }, ParameterByRef = new bool [] { false })]

That's a "less than legacy" situation. However in other cases this different behaviour from the linker is positive, see https://github.com/xamarin/xamarin-macios/issues/11985

spouliot avatar Aug 12 '21 17:08 spouliot