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: 08eae60
Choose a base ref
...
head repository: dotnet/linker
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: faf9cc0
Choose a head ref
  • 3 commits
  • 31 files changed
  • 3 contributors

Commits on Feb 1, 2021

  1. Update dependencies from https://github.com/dotnet/runtime build 2021…

    …0201.2 (#1792)
    
    [master] Update dependencies from dotnet/runtime
    dotnet-maestro[bot] authored Feb 1, 2021
    Configuration menu
    Copy the full SHA
    a30fc47 View commit details
    Browse the repository at this point in the history
  2. Warn on called methods annotated with RequiresUnreferencedCode (#1778)

    * Only process direct calls and reflection method references.
    
    * Clean test
    
    * Add tests
    
    * Check for null origin
    
    * Warn on DynamicallyAccessedMember kind.
    
    * Update warnings message for Requires Unreferenced Code
    
    * Mark interfaces of types accessed via reflection
    
    * Fix whitespace
    
    * Add includeInterfaceTypes parameter
    
    * Keep set action for methods in MarkEntireType
    
    * Add test for dynamic dependency with RUC.
    
    * Fix DependencyKind in MarkTypeForDynamicallyAccessedMembers
    Pass null to origin's parameter when processing optimized overrides
    Add DynamicDependency to list of valid dependency kinds in ProcessRequiresUnreferencedCode
    
    * Fix formatting
    mateoatr authored Feb 1, 2021
    Configuration menu
    Copy the full SHA
    6745019 View commit details
    Browse the repository at this point in the history

Commits on Feb 3, 2021

  1. Fix overreporting of warnings due to RequiresUnreferencedCode (#1798)

    Linker has intrinsic handling for some methods which are annotated with `RequiresUnreferencedCodeAttribute`. The intrinsic handling will sometimes recognize the pattern and avoid generating a warning, at other times it will generate a better more specific warning. In cases where this happens the generic handler for `RequiresUnreferencedCodeAttribute` should not kick in, as it would still produce a warning.
    
    The change:
    * For direct calls, virtual calls and `.ctor` calls rely on `ReflectionMethodBodyScanner` to handle all warnings caused by `RequiresUnreferencedCodeAttribute`. It has knowledge about intrinsic handling and can handle all non-intrisic calls as well.
    * Limit the generic handler in `MarkMethod` to all other cases (typically reflection or other indirect references to the method)
    
    Test changes:
    * We already have test cases which trigger these conditions, but we don't have a way to validate that extra warnings were not produced
    * Added `ExpectedNoWarnings` test attribute which validates no warnings other than those explicitly stated by the test are produced.
    * Used it on two test cases which trigger the interesting condition - and fixed the tests to correctly expect all warnings
    vitek-karas authored Feb 3, 2021
    Configuration menu
    Copy the full SHA
    faf9cc0 View commit details
    Browse the repository at this point in the history
Loading