-
Notifications
You must be signed in to change notification settings - Fork 127
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
Keep GetInstance method on custom marshalers #1308
Conversation
Fixes dotnet#1281. We also need a trimming directive in CoreLib that says we want to keep all methods on ICustomMarshaler to make this work E2E, but that's not a linker concern anymore (and it's not testable here...).
src/linker/Linker.Steps/MarkStep.cs
Outdated
@@ -1877,6 +1885,16 @@ protected bool MarkDefaultConstructor (TypeDefinition type, in DependencyInfo re | |||
return MarkMethodIf (type.Methods, MethodDefinitionExtensions.IsDefaultConstructor, reason, sourceLocationMember) != null; | |||
} | |||
|
|||
protected bool MarkGetInstanceMethod (TypeDefinition type, in DependencyInfo reason, IMemberDefinition sourceLocationMember) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: why return bool
(not used in here)... and also why protected
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I copy-pasted MarkDefaultConstructor above. No special reason. Undone.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The same question as Vitek, otherwise LGTM
Fixes dotnet/linker#1281. We also need a trimming directive in CoreLib that says we want to keep all methods on ICustomMarshaler to make this work E2E, but that's not a linker concern anymore (and it's not testable here...). Commit migrated from dotnet/linker@ee586ba
Fixes #1281.
We also need a trimming directive in CoreLib that says we want to keep all methods on ICustomMarshaler to make this work E2E, but that's not a linker concern anymore (and it's not testable here...).