Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Numerous failures while building efcore tests in VMR #35547

Open
NikolaMilosavljevic opened this issue Jan 29, 2025 · 2 comments
Open

Numerous failures while building efcore tests in VMR #35547

NikolaMilosavljevic opened this issue Jan 29, 2025 · 2 comments

Comments

@NikolaMilosavljevic
Copy link
Member

NikolaMilosavljevic commented Jan 29, 2025

Here are the errors encountered when we tried to enable building tests in VMR:

C:\git\dotnet\src\efcore\test\EFCore.Specification.Tests\Query\PrimitiveCollectionsQueryTestBase.cs(23,67): error CS0854: An expression tree may not contain a call or invocation that uses optional arguments [C:\git\dotnet\src\efcore\test\EFCore.Specification.Tests\EFCore.Specification.Tests.csproj]
C:\git\dotnet\src\efcore\test\EFCore.Specification.Tests\Query\PrimitiveCollectionsQueryTestBase.cs(30,67): error CS0854: An expression tree may not contain a call or invocation that uses optional arguments [C:\git\dotnet\src\efcore\test\EFCore.Specification.Tests\EFCore.Specification.Tests.csproj]
C:\git\dotnet\src\efcore\test\EFCore.Specification.Tests\Query\PrimitiveCollectionsQueryTestBase.cs(406,67): error CS0854: An expression tree may not contain a call or invocation that uses optional arguments [C:\git\dotnet\src\efcore\test\EFCore.Specification.Tests\EFCore.Specification.Tests.csproj]
C:\git\dotnet\src\efcore\test\EFCore.Specification.Tests\Query\PrimitiveCollectionsQueryTestBase.cs(409,68): error CS0854: An expression tree may not contain a call or invocation that uses optional arguments [C:\git\dotnet\src\efcore\test\EFCore.Specification.Tests\EFCore.Specification.Tests.csproj]
C:\git\dotnet\src\efcore\test\EFCore.Specification.Tests\Query\PrimitiveCollectionsQueryTestBase.cs(420,67): error CS0854: An expression tree may not contain a call or invocation that uses optional arguments [C:\git\dotnet\src\efcore\test\EFCore.Specification.Tests\EFCore.Specification.Tests.csproj]
C:\git\dotnet\src\efcore\test\EFCore.Specification.Tests\Query\PrimitiveCollectionsQueryTestBase.cs(423,68): error CS0854: An expression tree may not contain a call or invocation that uses optional arguments [C:\git\dotnet\src\efcore\test\EFCore.Specification.Tests\EFCore.Specification.Tests.csproj]
C:\git\dotnet\src\efcore\test\EFCore.Specification.Tests\Query\PrimitiveCollectionsQueryTestBase.cs(625,67): error CS0854: An expression tree may not contain a call or invocation that uses optional arguments [C:\git\dotnet\src\efcore\test\EFCore.Specification.Tests\EFCore.Specification.Tests.csproj]
C:\git\dotnet\src\efcore\test\EFCore.Specification.Tests\Query\PrimitiveCollectionsQueryTestBase.cs(689,67): error CS0854: An expression tree may not contain a call or invocation that uses optional arguments [C:\git\dotnet\src\efcore\test\EFCore.Specification.Tests\EFCore.Specification.Tests.csproj]
C:\git\dotnet\src\efcore\test\EFCore.Specification.Tests\Query\PrimitiveCollectionsQueryTestBase.cs(696,67): error CS0854: An expression tree may not contain a call or invocation that uses optional arguments [C:\git\dotnet\src\efcore\test\EFCore.Specification.Tests\EFCore.Specification.Tests.csproj]
C:\git\dotnet\src\efcore\test\EFCore.Specification.Tests\Query\NorthwindWhereQueryTestBase.cs(1633,29): error CS0854: An expression tree may not contain a call or invocation that uses optional arguments [C:\git\dotnet\src\efcore\test\EFCore.Specification.Tests\EFCore.Specification.Tests.csproj]
C:\git\dotnet\src\efcore\test\EFCore.Specification.Tests\Query\NorthwindWhereQueryTestBase.cs(1707,29): error CS0854: An expression tree may not contain a call or invocation that uses optional arguments [C:\git\dotnet\src\efcore\test\EFCore.Specification.Tests\EFCore.Specification.Tests.csproj]
C:\git\dotnet\src\efcore\test\EFCore.Specification.Tests\Query\NorthwindAggregateOperatorsQueryTestBase.cs(950,49): error CS0854: An expression tree may not contain a call or invocation that uses optional arguments [C:\git\dotnet\src\efcore\test\EFCore.Specification.Tests\EFCore.Specification.Tests.csproj]
C:\git\dotnet\src\efcore\test\EFCore.Specification.Tests\Query\NorthwindAggregateOperatorsQueryTestBase.cs(956,49): error CS0854: An expression tree may not contain a call or invocation that uses optional arguments [C:\git\dotnet\src\efcore\test\EFCore.Specification.Tests\EFCore.Specification.Tests.csproj]
C:\git\dotnet\src\efcore\test\EFCore.Specification.Tests\Query\NorthwindAggregateOperatorsQueryTestBase.cs(1350,52): error CS0854: An expression tree may not contain a call or invocation that uses optional arguments [C:\git\dotnet\src\efcore\test\EFCore.Specification.Tests\EFCore.Specification.Tests.csproj]
C:\git\dotnet\src\efcore\test\EFCore.Specification.Tests\Query\NorthwindAggregateOperatorsQueryTestBase.cs(1361,52): error CS0854: An expression tree may not contain a call or invocation that uses optional arguments [C:\git\dotnet\src\efcore\test\EFCore.Specification.Tests\EFCore.Specification.Tests.csproj]
C:\git\dotnet\src\efcore\test\EFCore.Specification.Tests\Query\GearsOfWarQueryTestBase.cs(5982,54): error CS0854: An expression tree may not contain a call or invocation that uses optional arguments [C:\git\dotnet\src\efcore\test\EFCore.Specification.Tests\EFCore.Specification.Tests.csproj]

For repro, add /p:DotNetBuildTests=true to your Windows VMR build command, i.e.: build -prepareMachine -c Release /p:TargetOS=windows /p:TargetArchitecture=x64 /bl /p:DotNetBuildTests=true

@roji
Copy link
Member

roji commented Jan 30, 2025

This is a result of dotnet/runtime#110197, which adds an overload of MemoryExtensions.Contains that has an optional comparer parameter, but expression trees do not support optional parameters (in this repo we haven't yet updated to a version of the SDK which has this).

I'll follow up on this in that issue.

roji added a commit to roji/efcore that referenced this issue Feb 2, 2025
Because of the new .NET Contains overload with an optional parameter,
which is incompatible with LINQ expression trees.

See dotnet#35547
roji added a commit to roji/efcore that referenced this issue Feb 2, 2025
Because of the new .NET Contains overload with an optional parameter,
which is incompatible with LINQ expression trees.

See dotnet#35547
@roji
Copy link
Member

roji commented Feb 2, 2025

FYI I've submitted #35569 to temporary comment out the problematic tests and allow EF to build with the latest SDK - until we decide how to properly fix the situation.

roji added a commit that referenced this issue Feb 3, 2025
Because of the new .NET Contains overload with an optional parameter,
which is incompatible with LINQ expression trees.

See #35547
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants