Skip to content

Categorize linking warnings for netcoreapp #44035

Description

@agocke

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

Activity

  1. Dotnet-GitSync-Bot commented on Oct 29, 2020

    @Dotnet-GitSync-Bot
    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.

  2. added
    linkable-frameworkIssues associated with delivering a linker friendly framework
    and removed
    untriagedNew issue has not been triaged by the area owner
    on Oct 29, 2020
  3. added this to the 6.0.0 milestone on Oct 29, 2020
  4. LakshanF commented on Oct 30, 2020

    @LakshanF
    Contributor

    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
  5. LakshanF commented on Oct 30, 2020

    @LakshanF
    Contributor

    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.
  6. marek-safar commented on Oct 30, 2020

    @marek-safar
    Contributor

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

  7. danmoseley commented on Nov 16, 2020

    @danmoseley
    Contributor

    added Drawing to table above.

  8. agocke commented on Dec 4, 2020

    @agocke
    MemberAuthor

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

  9. LakshanF commented on Dec 4, 2020

    @LakshanF
    Contributor
  10. ghost locked as resolved and limited conversation to collaborators on Jan 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area-Metalinkable-frameworkIssues associated with delivering a linker friendly framework

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions