Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/linker.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMateo Torres-Ruiz <mateoatr@users.noreply.github.com>2021-02-01 23:47:58 +0300
committerGitHub <noreply@github.com>2021-02-01 23:47:58 +0300
commit6745019eb02657ac07f35714c4ac781cd792111a (patch)
treebec41e1a72f4dd10b835b743dabd8a69b2b9cb76 /test/Mono.Linker.Tests
parenta30fc47b91a5794c3dfa82ea1e1a2127bdeccf98 (diff)
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
Diffstat (limited to 'test/Mono.Linker.Tests')
-rw-r--r--test/Mono.Linker.Tests/TestCases/Dependencies/SortedWarnings.txt5
1 files changed, 5 insertions, 0 deletions
diff --git a/test/Mono.Linker.Tests/TestCases/Dependencies/SortedWarnings.txt b/test/Mono.Linker.Tests/TestCases/Dependencies/SortedWarnings.txt
index 67d635f2f..ff53d8753 100644
--- a/test/Mono.Linker.Tests/TestCases/Dependencies/SortedWarnings.txt
+++ b/test/Mono.Linker.Tests/TestCases/Dependencies/SortedWarnings.txt
@@ -3,8 +3,13 @@ ILLink: Trim analysis warning IL2072: Mono.Linker.Tests.Cases.Warnings.Dependenc
ILLink: Trim analysis warning IL2072: Mono.Linker.Tests.Cases.Warnings.Dependencies.TriggerWarnings_Lib.Warning2.get: '#0' argument does not satisfy 'DynamicallyAccessedMemberTypes.PublicMethods', 'DynamicallyAccessedMemberTypes.NonPublicMethods' in call to 'System.Linq.Expressions.MethodCallExpression System.Linq.Expressions.Expression::Call(System.Type,System.String,System.Type[],System.Linq.Expressions.Expression[])'. The return value of method 'Mono.Linker.Tests.Cases.Warnings.Dependencies.TriggerWarnings_Lib.TriggerUnrecognizedPattern()' does not have matching annotations. The source value must declare at least the same requirements as those declared on the target location it is assigned to.
ILLink: Trim analysis warning IL2072: Mono.Linker.Tests.Cases.Warnings.Dependencies.TriggerWarnings_Lib.Main(): '#0' argument does not satisfy 'DynamicallyAccessedMemberTypes.PublicMethods', 'DynamicallyAccessedMemberTypes.NonPublicMethods' in call to 'System.Linq.Expressions.MethodCallExpression System.Linq.Expressions.Expression::Call(System.Type,System.String,System.Type[],System.Linq.Expressions.Expression[])'. The return value of method 'Mono.Linker.Tests.Cases.Warnings.Dependencies.TriggerWarnings_Lib.TriggerUnrecognizedPattern()' does not have matching annotations. The source value must declare at least the same requirements as those declared on the target location it is assigned to.
ILLink: Trim analysis warning IL2072: Mono.Linker.Tests.Cases.Warnings.Dependencies.TriggerWarnings_Lib.Warning1(): '#0' argument does not satisfy 'DynamicallyAccessedMemberTypes.PublicMethods', 'DynamicallyAccessedMemberTypes.NonPublicMethods' in call to 'System.Linq.Expressions.MethodCallExpression System.Linq.Expressions.Expression::Call(System.Type,System.String,System.Type[],System.Linq.Expressions.Expression[])'. The return value of method 'Mono.Linker.Tests.Cases.Warnings.Dependencies.TriggerWarnings_Lib.TriggerUnrecognizedPattern()' does not have matching annotations. The source value must declare at least the same requirements as those declared on the target location it is assigned to.
+ILLink: Trim analysis warning IL2026: Mono.Linker.Tests.Cases.Warnings.Individual.WarningsAreSorted.A.X(): 'System.Type.GetType(String)' method has 'RequiresUnreferencedCodeAttribute' which can break functionality when trimming application code. The type might be removed.
ILLink: Trim analysis warning IL2075: Mono.Linker.Tests.Cases.Warnings.Individual.WarningsAreSorted.A.X(): 'this' argument does not satisfy 'DynamicallyAccessedMemberTypes.PublicMethods' in call to 'System.Type.GetMethod(String)'. The return value of method 'System.Type.GetType(String)' does not have matching annotations. The source value must declare at least the same requirements as those declared on the target location it is assigned to.
+ILLink: Trim analysis warning IL2026: Mono.Linker.Tests.Cases.Warnings.Individual.WarningsAreSorted.A.Y(): 'System.Type.GetType(String)' method has 'RequiresUnreferencedCodeAttribute' which can break functionality when trimming application code. The type might be removed.
ILLink: Trim analysis warning IL2075: Mono.Linker.Tests.Cases.Warnings.Individual.WarningsAreSorted.A.Y(): 'this' argument does not satisfy 'DynamicallyAccessedMemberTypes.PublicMethods' in call to 'System.Type.GetMethod(String)'. The return value of method 'System.Type.GetType(String)' does not have matching annotations. The source value must declare at least the same requirements as those declared on the target location it is assigned to.
+ILLink: Trim analysis warning IL2026: Mono.Linker.Tests.Cases.Warnings.Individual.WarningsAreSorted.B.X(): 'System.Type.GetType(String)' method has 'RequiresUnreferencedCodeAttribute' which can break functionality when trimming application code. The type might be removed.
ILLink: Trim analysis warning IL2075: Mono.Linker.Tests.Cases.Warnings.Individual.WarningsAreSorted.B.X(): 'this' argument does not satisfy 'DynamicallyAccessedMemberTypes.PublicMethods' in call to 'System.Type.GetMethod(String)'. The return value of method 'System.Type.GetType(String)' does not have matching annotations. The source value must declare at least the same requirements as those declared on the target location it is assigned to.
+ILLink: Trim analysis warning IL2026: Mono.Linker.Tests.Cases.Warnings.Individual.WarningsAreSorted.B.Y(): 'System.Type.GetType(String)' method has 'RequiresUnreferencedCodeAttribute' which can break functionality when trimming application code. The type might be removed.
ILLink: Trim analysis warning IL2075: Mono.Linker.Tests.Cases.Warnings.Individual.WarningsAreSorted.B.Y(): 'this' argument does not satisfy 'DynamicallyAccessedMemberTypes.PublicMethods' in call to 'System.Type.GetMethod(String)'. The return value of method 'System.Type.GetType(String)' does not have matching annotations. The source value must declare at least the same requirements as those declared on the target location it is assigned to.
+ILLink: Trim analysis warning IL2026: Mono.Linker.Tests.Cases.Warnings.Individual.WarningsAreSorted.B.Z(): 'System.Type.GetType(String)' method has 'RequiresUnreferencedCodeAttribute' which can break functionality when trimming application code. The type might be removed.
ILLink: Trim analysis warning IL2075: Mono.Linker.Tests.Cases.Warnings.Individual.WarningsAreSorted.B.Z(): 'this' argument does not satisfy 'DynamicallyAccessedMemberTypes.PublicMethods' in call to 'System.Type.GetMethod(String)'. The return value of method 'System.Type.GetType(String)' does not have matching annotations. The source value must declare at least the same requirements as those declared on the target location it is assigned to. \ No newline at end of file