-
Notifications
You must be signed in to change notification settings - Fork 5.3k
Add always trimmed attributes list for browser config #39000
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 all commits
c294b47
08d790a
ffe0b6d
bb840d2
64f2a45
fc69953
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,149 @@ | ||
| <linker> | ||
| <assembly fullname="System.Private.CoreLib"> | ||
| <!-- System --> | ||
| <type fullname="System.CLSCompliantAttribute"> | ||
| <attribute internal="RemoveAttributeInstances" /> | ||
| </type> | ||
| <type fullname="System.ObsoleteAttribute"> | ||
| <!-- | ||
| Note that removing this attribute can change runtime behavior. For example, | ||
| System.Xml.Serialization will behave differently if a ctor is Obsolete. | ||
| This is low enough risk on wasm to justify the removing the attribute for size | ||
| savings. The app developer can override this setting to keep all ObsoleteAttributes. | ||
| --> | ||
| <attribute internal="RemoveAttributeInstances" /> | ||
| </type> | ||
|
|
||
| <!-- System.Diagnostics.CodeAnalysis --> | ||
| <type fullname="System.Diagnostics.CodeAnalysis.DynamicallyAccessedMembersAttribute"> | ||
| <attribute internal="RemoveAttributeInstances" /> | ||
| </type> | ||
| <type fullname="System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverageAttribute"> | ||
| <attribute internal="RemoveAttributeInstances" /> | ||
| </type> | ||
| <type fullname="System.Diagnostics.CodeAnalysis.SuppressMessageAttribute"> | ||
| <attribute internal="RemoveAttributeInstances" /> | ||
| </type> | ||
| <type fullname="System.Diagnostics.CodeAnalysis.RequiresUnreferencedCodeAttribute"> | ||
| <attribute internal="RemoveAttributeInstances" /> | ||
| </type> | ||
| <type fullname="System.Diagnostics.CodeAnalysis.UnconditionalSuppressMessageAttribute"> | ||
| <attribute internal="RemoveAttributeInstances" /> | ||
| </type> | ||
| <type fullname="System.Diagnostics.CodeAnalysis.AllowNullAttribute"> | ||
| <attribute internal="RemoveAttributeInstances" /> | ||
| </type> | ||
| <type fullname="System.Diagnostics.CodeAnalysis.DisallowNullAttribute"> | ||
| <attribute internal="RemoveAttributeInstances" /> | ||
| </type> | ||
| <type fullname="System.Diagnostics.CodeAnalysis.MaybeNullAttribute"> | ||
| <attribute internal="RemoveAttributeInstances" /> | ||
| </type> | ||
| <type fullname="System.Diagnostics.CodeAnalysis.MaybeNullWhenAttribute"> | ||
| <attribute internal="RemoveAttributeInstances" /> | ||
| </type> | ||
| <type fullname="System.Diagnostics.CodeAnalysis.NotNullAttribute"> | ||
| <attribute internal="RemoveAttributeInstances" /> | ||
| </type> | ||
| <type fullname="System.Diagnostics.CodeAnalysis.NotNullWhenAttribute"> | ||
| <attribute internal="RemoveAttributeInstances" /> | ||
| </type> | ||
| <type fullname="System.Diagnostics.CodeAnalysis.NotNullIfNotNullAttribute"> | ||
| <attribute internal="RemoveAttributeInstances" /> | ||
| </type> | ||
| <type fullname="System.Diagnostics.CodeAnalysis.DoesNotReturnAttribute"> | ||
| <attribute internal="RemoveAttributeInstances" /> | ||
| </type> | ||
| <type fullname="System.Diagnostics.CodeAnalysis.DoesNotReturnIfAttribute"> | ||
| <attribute internal="RemoveAttributeInstances" /> | ||
| </type> | ||
| <type fullname="System.Diagnostics.CodeAnalysis.MemberNotNullAttribute"> | ||
| <attribute internal="RemoveAttributeInstances" /> | ||
| </type> | ||
| <type fullname="System.Diagnostics.CodeAnalysis.MemberNotNullWhenAttribute"> | ||
| <attribute internal="RemoveAttributeInstances" /> | ||
| </type> | ||
|
|
||
| <!-- System.Runtime.CompilerServices --> | ||
| <type fullname="System.Runtime.CompilerServices.AsyncMethodBuilderAttribute"> | ||
| <attribute internal="RemoveAttributeInstances" /> | ||
| </type> | ||
| <type fullname="System.Runtime.CompilerServices.CallerArgumentExpressionAttribute"> | ||
| <attribute internal="RemoveAttributeInstances" /> | ||
| </type> | ||
| <type fullname="System.Runtime.CompilerServices.CallerMemberNameAttribute"> | ||
| <attribute internal="RemoveAttributeInstances" /> | ||
| </type> | ||
| <type fullname="System.Runtime.CompilerServices.CallerFilePathAttribute"> | ||
| <attribute internal="RemoveAttributeInstances" /> | ||
| </type> | ||
| <type fullname="System.Runtime.CompilerServices.CallerLineNumberAttribute"> | ||
| <attribute internal="RemoveAttributeInstances" /> | ||
| </type> | ||
| <type fullname="System.Runtime.CompilerServices.CallerMemberNameAttribute"> | ||
| <attribute internal="RemoveAttributeInstances" /> | ||
| </type> | ||
| <type fullname="System.Runtime.CompilerServices.CompilerGeneratedAttribute" feature="System.Diagnostics.Debugger.IsSupported" featurevalue="false"> | ||
| <!-- | ||
| The attribute is used during pretty stack trace printing | ||
|
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.
Contributor
Author
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. Yep, there is a bunch of others which should be added as conditional (e.g. whole ETW). I'd prefer to add them in follow up PRs |
||
| --> | ||
| <attribute internal="RemoveAttributeInstances" /> | ||
| </type> | ||
| <type fullname="System.Runtime.CompilerServices.CompilerGlobalScopeAttribute"> | ||
| <attribute internal="RemoveAttributeInstances" /> | ||
| </type> | ||
|
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. CompilerGenerated is checked by StackTrace.ToString, so this will affect Exception.StackTrace/ToString(), for example.
Contributor
Author
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. Hmm, that's ugly. Looking at the code it looks like CompilerGeneratedAttribute usage there is optimization like check. We could remove the check or if it's really needed we could remove this attribute under Debug.IsEnabled condition only.
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. Should we remove this one and add it with the rest of the Debug-only attributes under the Examples of the Debug-only attributes that can be removed are:
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 think it's more there in case the types in question were implemented by someone manually; it's trying to only remove the relevant frames when they're on compiler generated types for async and iterators. It may be over protective, but I'm hesitant to remove it for the purposes of this PR.
That sounds reasonable.
Contributor
Author
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. Changed it to be conditional
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. just to make sure I understand: in cases where debugger is disabled the StackTrace would now include the compiler-generated frames?
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. Correct: the code looking for the attribute wouldn't find it, and so wouldn't skip the frames. |
||
| <type fullname="System.Runtime.CompilerServices.IsReadOnlyAttribute"> | ||
| <attribute internal="RemoveAttributeInstances" /> | ||
| </type> | ||
| <type fullname="System.Runtime.CompilerServices.EnumeratorCancellationAttribute"> | ||
| <attribute internal="RemoveAttributeInstances" /> | ||
| </type> | ||
| <type fullname="System.Runtime.CompilerServices.ExtensionAttribute"> | ||
| <attribute internal="RemoveAttributeInstances" /> | ||
| </type> | ||
| <type fullname="System.Runtime.CompilerServices.IntrinsicAttribute"> | ||
| <attribute internal="RemoveAttributeInstances" /> | ||
| </type> | ||
stephentoub marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| <type fullname="System.Runtime.CompilerServices.SkipLocalsInitAttribute"> | ||
| <attribute internal="RemoveAttributeInstances" /> | ||
| </type> | ||
| <type fullname="System.Runtime.CompilerServices.TupleElementNamesAttribute"> | ||
| <attribute internal="RemoveAttributeInstances" /> | ||
| </type> | ||
|
|
||
| <!-- System.Runtime.Versioning --> | ||
| <type fullname="System.Runtime.Versioning.NonVersionableAttribute"> | ||
| <attribute internal="RemoveAttributeInstances" /> | ||
| </type> | ||
|
|
||
| <!-- Microsoft.ComponentModel --> | ||
| <type fullname="System.ComponentModel.EditorBrowsableAttribute"> | ||
| <attribute internal="RemoveAttributeInstances" /> | ||
| </type> | ||
| </assembly> | ||
|
|
||
| <!-- The following attributes are generated by the compiler, so they could be in any assembly --> | ||
| <assembly fullname="*"> | ||
| <!-- System.Runtime.CompilerServices --> | ||
| <type fullname="System.Runtime.CompilerServices.IsUnmanagedAttribute"> | ||
| <attribute internal="RemoveAttributeInstances" /> | ||
| </type> | ||
| <type fullname="System.Runtime.CompilerServices.NativeIntegerAttribute"> | ||
| <attribute internal="RemoveAttributeInstances" /> | ||
| </type> | ||
| <type fullname="System.Runtime.CompilerServices.NullableAttribute"> | ||
| <attribute internal="RemoveAttributeInstances" /> | ||
| </type> | ||
| <type fullname="System.Runtime.CompilerServices.NullableContextAttribute"> | ||
| <attribute internal="RemoveAttributeInstances" /> | ||
| </type> | ||
| <type fullname="System.Runtime.CompilerServices.NullablePublicOnlyAttribute"> | ||
| <attribute internal="RemoveAttributeInstances" /> | ||
| </type> | ||
|
|
||
| <!-- Microsoft.CodeAnalysis --> | ||
| <type fullname="Microsoft.CodeAnalysis.EmbeddedAttribute"> | ||
| <attribute internal="RemoveAttributeInstances" /> | ||
| </type> | ||
| </assembly> | ||
| </linker> | ||
Uh oh!
There was an error while loading. Please reload this page.