Skip to content

Commit f6abd5c

Browse files
dotnet-maestro[bot]captainsafia
authored andcommitted
[main] Update dependencies from dotnet/runtime (#57742)
[main] Update dependencies from dotnet/runtime - Apply workaround for linker issues - Fix for linker errors - Embed descriptors file in test project - Fix typo
1 parent 9c2447d commit f6abd5c

File tree

9 files changed

+238
-218
lines changed

9 files changed

+238
-218
lines changed

eng/Version.Details.xml

Lines changed: 144 additions & 144 deletions
Large diffs are not rendered by default.

eng/Versions.props

Lines changed: 72 additions & 72 deletions
Large diffs are not rendered by default.
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<linker>
2+
<assembly fullname="System.Private.CoreLib">
3+
<type fullname="System.Array" />
4+
</assembly>
5+
</linker>

eng/testing/linker/project.csproj.template

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,4 +27,11 @@
2727
{AdditionalProjectReferences}
2828
</ItemGroup>
2929

30+
<!-- Workaround for trimming tests failing during execution. -->
31+
<ItemGroup>
32+
<EmbeddedResource Include="ILLink.Descriptors.xml">
33+
<LogicalName>ILLink.Descriptors.xml</LogicalName>
34+
</EmbeddedResource>
35+
</ItemGroup>
36+
3037
</Project>

eng/testing/linker/trimmingTests.targets

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,8 @@
9696
<Copy SourceFiles="$(_projectSourceFile);
9797
@(_additionalProjectSourceFiles)"
9898
DestinationFolder="$(_projectDir)" />
99+
<Copy SourceFiles="$(MSBuildThisFileDirectory)ILLink.Descriptors.xml"
100+
DestinationFolder="$(_projectDir)" />
99101
<Message Text="Generated $(_projectFile)" />
100102
</Target>
101103

src/Components/Forms/src/FieldIdentifier.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ private static void ParseAccessor<T>(Expression<Func<T>> accessor, out object mo
126126
// so, given that it embeds captured values such as "this". We could consider special-casing
127127
// for "() => something.Member" and building a cache keyed by "something.GetType()" with values
128128
// of type Func<object, object> so we can cheaply map from "something" to "something.Member".
129-
var modelLambda = Expression.Lambda(memberExpression.Expression);
129+
var modelLambda = Expression.Lambda(typeof(Func<object?>), memberExpression.Expression);
130130
var modelLambdaCompiled = (Func<object?>)modelLambda.Compile();
131131
var result = modelLambdaCompiled() ??
132132
throw new ArgumentException("The provided expression must evaluate to a non-null value.");
@@ -201,7 +201,7 @@ static Func<object, object> CreateAccessor((Type model, MemberInfo member) arg)
201201
private static object GetModelFromIndexer(Expression methodCallExpression)
202202
{
203203
object model;
204-
var methodCallObjectLambda = Expression.Lambda(methodCallExpression!);
204+
var methodCallObjectLambda = Expression.Lambda(typeof(Func<object?>), methodCallExpression!);
205205
var methodCallObjectLambdaCompiled = (Func<object?>)methodCallObjectLambda.Compile();
206206
var result = methodCallObjectLambdaCompiled();
207207
if (result is null)

src/SignalR/server/Core/src/DynamicHub.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
11
// Licensed to the .NET Foundation under one or more agreements.
22
// The .NET Foundation licenses this file to you under the MIT license.
33

4+
using System.Diagnostics.CodeAnalysis;
45
namespace Microsoft.AspNetCore.SignalR;
56

67
/// <summary>
78
/// A base class for SignalR hubs that use <c>dynamic</c> to represent client invocations.
89
/// </summary>
10+
[RequiresDynamicCode("DynamicHub requires dynamic code generation to construct a call site.")]
911
public abstract class DynamicHub : Hub
1012
{
1113
private DynamicHubClients? _clients;

src/SignalR/server/Core/src/DynamicHubClients.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
11
// Licensed to the .NET Foundation under one or more agreements.
22
// The .NET Foundation licenses this file to you under the MIT license.
33

4+
using System.Diagnostics.CodeAnalysis;
45
using Microsoft.AspNetCore.SignalR.Internal;
56

67
namespace Microsoft.AspNetCore.SignalR;
78

89
/// <summary>
910
/// A class that provides <c>dynamic</c> access to connections, including the one that sent the current invocation.
1011
/// </summary>
12+
[RequiresDynamicCodeAttribute("DynamicHubClients requires dynamic code generation to construct a call site.")]
1113
public class DynamicHubClients
1214
{
1315
private readonly IHubCallerClients _clients;

src/SignalR/server/Core/src/Internal/DynamicClientProxy.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
// Licensed to the .NET Foundation under one or more agreements.
22
// The .NET Foundation licenses this file to you under the MIT license.
33

4+
using System.Diagnostics.CodeAnalysis;
45
using System.Dynamic;
56

67
namespace Microsoft.AspNetCore.SignalR.Internal;
@@ -9,6 +10,7 @@ internal sealed class DynamicClientProxy : DynamicObject
910
{
1011
private readonly IClientProxy _clientProxy;
1112

13+
[RequiresDynamicCodeAttribute("This constructor requires dynamic code generation to construct a call site.")]
1214
public DynamicClientProxy(IClientProxy clientProxy)
1315
{
1416
_clientProxy = clientProxy;

0 commit comments

Comments
 (0)