You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[dotnet-linker] Remove the [DynamicDependency] parameter-list workaround once dotnet/runtime#131892 is fixed #26413
We work around dotnet/runtime#131892 (the trimmer crashes with a NullReferenceException, surfaced as error IL1012, when it computes the documentation signature of a method whose parameter type is a nested type from another assembly) by emitting [DynamicDependency] signatures without a parameter list whenever the method name (+ generic arity) is unambiguous within its declaring type.
The trimmer then matches the method by name and arity alone, so it never has to compute a parameter signature — and never crashes.
Once the trimmer bug is fixed (and we've moved to a version of the SDK that contains the fix), this workaround should be removed so that [DynamicDependency] attributes are precise again instead of preserving every overload.
Remove GetDynamicDependencySignature and go back to calling DocumentationComments.GetSignature directly in AddDynamicDependencyAttribute and AddDynamicDependencyAttributeToStaticConstructor.
tools/dotnet-linker/DocumentionComments.cs
Remove GetNameSignature if it ends up with no callers.
Restore the GetConstant(CoreAnimation.CAToneMapMode) expectation.
tests/dotnet/UnitTests/expected/*
Regenerate the expected app sizes (precise signatures preserve fewer members).
Note that AddPreserveAllMembersDynamicDependencyAttributes also uses GetNameSignature, but that one is intentional and should stay: it implements [Preserve (AllMembers = true)], where every overload is preserved anyway, so matching by name is both correct and cheaper.
Activity
[dotnet-linker] Remove DynamicDependency signature workaround. Fixes #…