Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: dotnet/linker
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 31a57b5
Choose a base ref
...
head repository: dotnet/linker
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: f09bacf
Choose a head ref
  • 13 commits
  • 36 files changed
  • 9 contributors

Commits on Jul 19, 2022

  1. Configuration menu
    Copy the full SHA
    60f48c5 View commit details
    Browse the repository at this point in the history

Commits on Jul 20, 2022

  1. Fix syntax node scope and nullable warnings (#2900)

    The syntax node scope should be the innermost node, otherwise
    GetSymbolInfo will often return null. As an example, GetSymbolInfo will
    return null for an ArgumentSyntax node, but the underlying expression
    will likely resolve into a symbol.
    
    Also adds proper null checks in case any of the providers return null.
    agocke authored Jul 20, 2022
    Configuration menu
    Copy the full SHA
    7a61266 View commit details
    Browse the repository at this point in the history
  2. Add a test for stack overflow when marking lambda which indirectly ma…

    …rks itself (#2904)
    
    The lambda calls a generic method which has annotation on the generic argument to keep `All`, and the lambda passes its own parent type as the argument. So the annotation will end up marking the lambda itself.
    
    This is a test for #2903
    vitek-karas authored Jul 20, 2022
    Configuration menu
    Copy the full SHA
    fa9b810 View commit details
    Browse the repository at this point in the history

Commits on Jul 21, 2022

  1. Redundant warning suppressions detection (#2891)

    * Created first draft of unused suppressions detection doc.
    
    * design doc improvements
    
    * Fix redundant suppressions design doc wording
    
    * Fix typos
    
    Co-authored-by: Eric Erhardt <[email protected]>
    
    * Apply suggestions from code review
    
    Co-authored-by: Sven Boemer <[email protected]>
    
    * Changed example and added review suggestions.
    
    * Apply suggestions from code review
    
    Co-authored-by: Vitek Karas <[email protected]>
    
    * removed implementation details
    
    Co-authored-by: Eric Erhardt <[email protected]>
    Co-authored-by: Sven Boemer <[email protected]>
    Co-authored-by: Vitek Karas <[email protected]>
    4 people authored Jul 21, 2022
    Configuration menu
    Copy the full SHA
    e981e95 View commit details
    Browse the repository at this point in the history
  2. Fix re-entrancy when marking nested functions (#2907)

    This fixes endless recursion introduced by the change which scans
    compiler-generated methods as a group.
    
    This change fixes the re-entrancy instead of putting a temporary value
    in the cache, because this will make it easier to fix the behavior of
    CheckRequiresReflectionMethodBodyScanner to not consider type
    parameter annotations.
    sbomer authored Jul 21, 2022
    Configuration menu
    Copy the full SHA
    5809152 View commit details
    Browse the repository at this point in the history
  3. Avoid dataflow analysis for generic parameters (#2908)

    This avoids unnecessarily running the reflection methodbody scanner in
    the linker, and the dataflow analysis in the analyzer, for methods
    that were previously only triggering dataflow analysis due to
    annotated generic parameters.
    
    This eliminates unnecessary warnings for reflection access to
    compiler-generated code.
    sbomer authored Jul 21, 2022
    Configuration menu
    Copy the full SHA
    dbb51b0 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    d434293 View commit details
    Browse the repository at this point in the history

Commits on Jul 25, 2022

  1. DynamicallyAccessedMembers CodeFix (#2890)

    * Create infrastructure for CodeFixers that will generate attribute flags for DynamicallyAccessedMembers (DAM) trimmer warnings. This commit includes fixers for the warnings `DynamicallyAccessedMembersMismatchParameterTargetsThisParameter` and `DynamicallyAccessedMembersMismatchFieldTargetsThisParameter`. Additional DiagnosticIds will be supported by future commits.
    
    * Create new class for the DAM CodeFixer that does not rely on base class. The DAM warnings require different attribute placement depending on the type of warning that is raised, causing it to differ from the implementation of the base class.
    
    * Added a test file specifically for the DAM CodeFixer, include tests for the functional fixes as well as tests for fixes that will soon be implemented.
    
    * Converted all test cases within DAM to use string literals
    
    Co-authored-by: Andy Gocke <[email protected]>
    iserrato and agocke authored Jul 25, 2022
    Configuration menu
    Copy the full SHA
    8062da2 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    8ffd83c View commit details
    Browse the repository at this point in the history

Commits on Jul 26, 2022

  1. Map type parameters for static closures (#2899)

    This discovers type parameter mappings between generic type
    parameters and static closures which reference them. It detects
    the closure environment by scanning for stsfld instructions which
    reference generic closure types. There may be multiple methods
    associated with the same static closure, so this case doesn't
    produce warnings.
    
    This also fixes an unrelated issue where in Release mode, the
    compiler can generate struct closure environments that will never
    get instantiated via a ctor call. A new testcase runs the
    CompilerGeneratedTypes tests in Release mode to cover this.
    sbomer authored Jul 26, 2022
    Configuration menu
    Copy the full SHA
    b883ec2 View commit details
    Browse the repository at this point in the history
  2. Synchronize file type between analyzer and linker (#2917)

    Makes it so user does not have to zip their dumped dependencies file before running the analyzer and updates documentation to reflect the change.
    iserrato authored Jul 26, 2022
    Configuration menu
    Copy the full SHA
    907020b View commit details
    Browse the repository at this point in the history
  3. Add more tests for parameter dataflow (#2918)

    Add tests for some edge cases due to the analyzer not treating
    captured parameters as hoisted variables like the linker does.
    
    Currently the analyzer doesn't detect hoisted parameters, and it
    will treat them like normal parameters - warning if a parameter
    is assigned a value with an annotation that doesn't match the
    parameter annotation. The linker will treat captured parameters
    the same as other captured variables, tracking all values that
    get assigned. So there is a subtle difference in the warning
    behavior:
    
    - Linker won't warn on assignment to annotated captured
      parameter, but analyzer will.
    
    - Linker will produce dataflow warnings for all values assigned
      to a captured parameter, but analyzer will not.
    sbomer authored Jul 26, 2022
    Configuration menu
    Copy the full SHA
    145f0d2 View commit details
    Browse the repository at this point in the history

Commits on Jul 27, 2022

  1. Configuration menu
    Copy the full SHA
    f09bacf View commit details
    Browse the repository at this point in the history
Loading