-
Notifications
You must be signed in to change notification settings - Fork 5.3k
[main] Update dependencies from mono/linker #56593
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
Changes from 1 commit
4f9af86
890bcb7
43f29d7
4afe081
06b421b
a53d3d6
c353468
1a111df
03dc002
b96ed81
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
- Loading branch information
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -161,12 +161,12 @@ namespace System.Diagnostics | |
| /// </summary> | ||
| [EventSource(Name = "Microsoft-Diagnostics-DiagnosticSource")] | ||
| // These suppressions can go away with https://github.com/mono/linker/issues/2175 | ||
| [UnconditionalSuppressMessage("ReflectionAnalysis", "IL2113:RequiresUnreferencedCode", | ||
| [UnconditionalSuppressMessage("ReflectionAnalysis", "IL2113:ReflectionToRequiresUnreferencedCode", | ||
| Justification = "In EventSource, EnsureDescriptorsInitialized's use of GetType preserves methods on Delegate and MulticastDelegate " + | ||
| "because the nested type OverrideEventProvider's base type EventProvider defines a delegate. " + | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm not sure I understand why
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The warning is due to DAMT.All on EventSource, which ensures that GetType keeps everything on EventSource - in this case the nested type OverrideEventProvider, plus its base type EventProvider, which has a delegate, which has some RUC methods: https://github.com/dotnet/runtime/blob/main/src/libraries/System.Private.CoreLib/src/System/Delegate.cs#L45. Ideally we wouldn't produce this warning for derived types, and it would show up only on EventSource, but we haven't taught the linker about this (see dotnet/linker#2175). In theory this should currently show up on every derived EventSource... but I believe due to dotnet/linker#2159 we only produce a warning for the first one that we see. :( /cc @LakshanF
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Oh no, that doesn't sound like a great situation.
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This sounds bad - could it lead to us getting warnings from CoreLib when trimming apps? For some reason linker will see this on another EventSource and will warn there - and it's not suppressed there. We need to fix this if that's the case. |
||
| "This includes Delegate and MulticastDelegate methods which require unreferenced code, but " + | ||
| "EnsureDescriptorsInitialized does not access these members and is safe to call.")] | ||
| [UnconditionalSuppressMessage("ReflectionAnalysis", "IL2115:RequiresDynamicallyAccessedMembers", | ||
| [UnconditionalSuppressMessage("ReflectionAnalysis", "IL2115:ReflectionToDynamicallyAccessedMembers", | ||
| Justification = "In EventSource, EnsureDescriptorsInitialized's use of GetType preserves methods on Delegate and MulticastDelegate " + | ||
| "because the nested type OverrideEventProvider's base type EventProvider defines a delegate. " + | ||
| "This includes Delegate and MulticastDelegate methods which have dynamically accessed members requirements, but " + | ||
|
|
@@ -1024,7 +1024,7 @@ private void Dispose() | |
| } | ||
| } | ||
|
|
||
| [UnconditionalSuppressMessage("ReflectionAnalysis", "IL2112:RequiresUnreferencedCode", | ||
| [UnconditionalSuppressMessage("ReflectionAnalysis", "IL2112:ReflectionToRequiresUnreferencedCode", | ||
| Justification = "In EventSource, EnsureDescriptorsInitialized's use of GetType preserves this method which " + | ||
| "requires unreferenced code, but EnsureDescriptorsInitialized does not access this member and is safe to call.")] | ||
| [RequiresUnreferencedCode(DiagnosticSource.WriteRequiresUnreferencedCode)] | ||
|
|
@@ -1108,7 +1108,7 @@ private void Dispose() | |
|
|
||
| // Given a type generate all the implicit transforms for type (that is for every field | ||
| // generate the spec that fetches it). | ||
| [UnconditionalSuppressMessage("ReflectionAnalysis", "IL2112:RequiresUnreferencedCode", | ||
| [UnconditionalSuppressMessage("ReflectionAnalysis", "IL2112:ReflectionToRequiresUnreferencedCode", | ||
| Justification = "In EventSource, EnsureDescriptorsInitialized's use of GetType preserves this method which " + | ||
| "requires unreferenced code, but EnsureDescriptorsInitialized does not access this member and is safe to call.")] | ||
| [RequiresUnreferencedCode(DiagnosticSource.WriteRequiresUnreferencedCode)] | ||
|
|
@@ -1206,7 +1206,7 @@ public TransformSpec(string transformSpec, int startIdx, int endIdx, TransformSp | |
| /// if the spec is OUTSTR=EVENT_VALUE.PROP1.PROP2.PROP3 and the ultimate value of PROP3 is | ||
| /// 10 then the return key value pair is KeyValuePair("OUTSTR","10") | ||
| /// </summary> | ||
| [UnconditionalSuppressMessage("ReflectionAnalysis", "IL2112:RequiresUnreferencedCode", | ||
| [UnconditionalSuppressMessage("ReflectionAnalysis", "IL2112:ReflectionToRequiresUnreferencedCode", | ||
| Justification = "In EventSource, EnsureDescriptorsInitialized's use of GetType preserves this method which " + | ||
| "requires unreferenced code, but EnsureDescriptorsInitialized does not access this member and is safe to call.")] | ||
| [RequiresUnreferencedCode(DiagnosticSource.WriteRequiresUnreferencedCode)] | ||
|
|
@@ -1260,7 +1260,7 @@ public PropertySpec(string propertyName, PropertySpec? next) | |
| /// Given an object fetch the property that this PropertySpec represents. | ||
| /// obj may be null when IsStatic is true, otherwise it must be non-null. | ||
| /// </summary> | ||
| [UnconditionalSuppressMessage("ReflectionAnalysis", "IL2112:RequiresUnreferencedCode", | ||
| [UnconditionalSuppressMessage("ReflectionAnalysis", "IL2112:ReflectionToRequiresUnreferencedCode", | ||
| Justification = "In EventSource, EnsureDescriptorsInitialized's use of GetType preserves this method which " + | ||
| "requires unreferenced code, but EnsureDescriptorsInitialized does not access this member and is safe to call.")] | ||
| [RequiresUnreferencedCode(DiagnosticSource.WriteRequiresUnreferencedCode)] | ||
|
|
@@ -1306,7 +1306,7 @@ public PropertyFetch(Type? type) | |
| /// <summary> | ||
| /// Create a property fetcher for a propertyName | ||
| /// </summary> | ||
| [UnconditionalSuppressMessage("ReflectionAnalysis", "IL2112:RequiresUnreferencedCode", | ||
| [UnconditionalSuppressMessage("ReflectionAnalysis", "IL2112:ReflectionToRequiresUnreferencedCode", | ||
| Justification = "In EventSource, EnsureDescriptorsInitialized's use of GetType preserves this method which " + | ||
| "requires unreferenced code, but EnsureDescriptorsInitialized does not access this member and is safe to call.")] | ||
| [RequiresUnreferencedCode(DiagnosticSource.WriteRequiresUnreferencedCode)] | ||
|
|
||
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.
Yay for extra validation. Caught a bug here...