Skip to content
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

Categorize linking warnings for netcoreapp #44035

Closed
3 tasks done
agocke opened this issue Oct 29, 2020 · 7 comments
Closed
3 tasks done

Categorize linking warnings for netcoreapp #44035

agocke opened this issue Oct 29, 2020 · 7 comments
Assignees
Labels
area-Meta linkable-framework Issues associated with delivering a linker friendly framework
Milestone

Comments

@agocke
Copy link
Member

agocke commented Oct 29, 2020

To make netcoreapp linkable we need to:

  • Get a list of all warnings produced when linking netcoreapp
  • Categorize the warnings by product area/namespace
  • Identify the cause of the warnings, and propose a fix
@Dotnet-GitSync-Bot
Copy link
Collaborator

I couldn't figure out the best area label to add to this issue. If you have write-permissions please help me learn by adding exactly one area label.

@Dotnet-GitSync-Bot Dotnet-GitSync-Bot added the untriaged New issue has not been triaged by the area owner label Oct 29, 2020
@agocke agocke added linkable-framework Issues associated with delivering a linker friendly framework area-Meta and removed untriaged New issue has not been triaged by the area owner labels Oct 29, 2020
@agocke agocke added this to the 6.0.0 milestone Oct 29, 2020
@LakshanF
Copy link
Member

Below is the full linker warnings from netcoreapp (699 total)

link.out.txt

And the warning breakdown

Warning Count
IL2075 164
IL2060 158
IL2070 140
IL2026 53
IL2055 41
IL2057 35
IL2072 33
IL2067 23
IL2080 20
IL2077 15
IL2050 5
IL2082 3
IL2059 2
IL2065 1
IL2087 1
IL2090 1
IL2091 1
IL2079 1
IL2064 1
IL2085 1

@LakshanF
Copy link
Member

LakshanF commented Oct 30, 2020

Warnings by assemblies (low counts are ignored),

Assembly Cost Total Warnings Wrn Count Wrn2 Count3 Wrn3 Count4 Wrn4 Count5
System.Private.CoreLib XL 16 IL2072 4 IL2075 3 IL2057 3 IL2070 3
System.Linq.Expressions XL 72 IL2075 30 IL2070 22 IL2060 14 IL2077 4
System.Private.Xml XL 67 IL2070 26 IL2075 22 IL2026 5 IL2072 4
System.Private.CoreLib (Runtime) XL 46 IL2075 14 IL2026 13 IL2055 6 IL2057 3
System.ComponentModel.TypeConverter L 60 IL2075 17 IL2057 15 IL2070 8 IL2080 5
Microsoft.CSharp L? 25 IL2075 14 IL2072 3 IL2070 3 IL2055 2
Microsoft.VisualBasic.Core L? 25 IL2075 10 IL2070 8 IL2072 2 IL2080 1
System.Security.Cryptography.Algorithms M 25 IL2026 19 IL2075 4 IL2080 2    
System.Data.Common M 24 IL2057 9 IL2072 6 IL2077 4 IL2080 3
System.Text.Json M 16 IL2070 7 IL2075 4 IL2026 2 IL2060 2
System.ComponentModel.Annotations M 11 IL2072 4 IL2070 4 IL2077 2 IL2080 1
System.Runtime.Serialization.Formatters M 10 IL2070 3 IL2026 2 IL2075 2 IL2067 1
System.Private.DataContractSerialization M 118 IL2075 41 IL2055 33 IL2060 22 IL2070 16
System.Linq.Queryable S 110 IL2060 109 IL2067 1        
System.Reflection.DispatchProxy S 11 IL2067 7 IL2072 1 IL2070 1 IL2060 1
System.Text.RegularExpressions S 8 IL2060 5 IL2070 2 IL2067 1    
System.Net.Http.Json S 6 IL2072 4 IL2077 1 IL2091 1    A
System.Reflection.TypeExtensions S 31 IL2070 29 IL2026 2        
[NO ASSEMBLY INFO] 5 IL2050 5            
[Common] 4 IL2070 2 IL2075 2        
System.Diagnostics.DiagnosticSource S 2 IL2070 2            
System.Diagnostics.TraceSource S 2 IL2026 1 IL2070 1        
System.ObjectModel S 2 IL2079 1 IL2057 1        
System.Runtime.InteropServices S 2 IL2070 1 IL2075 1        
System.Security.Cryptography.Csp S 1 IL2026 1            
System.Drawing.Primitives S 1 IL2070 1

Notes/assumption on cost (eerhardt):

  1. Assume most of DataContractSerialization work is to mark serialization methods with RequiredUnreferencedCodeAttribute.
  2. Linq.Queryable has 106 of the same pattern. Once we solve the pattern, it will only have 3-4 different kinds of warnings.
  3. Linq.Expressions cost can be made smaller if our approach is just to mark virtually everything as RequiredUnreferencedCodeAttribute.
  4. I'm unsure on CSharp and VB.Core assemblies, so I guessed at L. Can be smaller if most of this is just marking as unsafe.

@marek-safar
Copy link
Contributor

Can we please do it for important RIDs first (each rid can give you different results)

@danmoseley
Copy link
Member

added Drawing to table above.

@agocke
Copy link
Member Author

agocke commented Dec 4, 2020

@LakshanF It looks like this is done -- are we ready to close this issue out or is there more investigation necessary for the issues?

@LakshanF
Copy link
Member

LakshanF commented Dec 4, 2020

@LakshanF LakshanF closed this as completed Dec 4, 2020
@ghost ghost locked as resolved and limited conversation to collaborators Jan 4, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-Meta linkable-framework Issues associated with delivering a linker friendly framework
Projects
None yet
Development

No branches or pull requests

5 participants