Skip to content

Commit

Permalink
[main] Update dependencies from dotnet/arcade (#32000)
Browse files Browse the repository at this point in the history
[main] Update dependencies from dotnet/arcade


 - React to xunit breaking changes
  • Loading branch information
dotnet-maestro[bot] authored Oct 12, 2023
1 parent 70681c3 commit d4e344b
Show file tree
Hide file tree
Showing 26 changed files with 75 additions and 130 deletions.
12 changes: 6 additions & 6 deletions eng/Version.Details.xml
Original file line number Diff line number Diff line change
Expand Up @@ -56,17 +56,17 @@
</Dependency>
</ProductDependencies>
<ToolsetDependencies>
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="8.0.0-beta.23463.1">
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="9.0.0-beta.23508.1">
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>1d451c32dda2314c721adbf8829e1c0cd4e681ff</Sha>
<Sha>822f095b8c815dd7b9161140a9ff8151de593f82</Sha>
</Dependency>
<Dependency Name="Microsoft.DotNet.Build.Tasks.Templating" Version="8.0.0-beta.23463.1">
<Dependency Name="Microsoft.DotNet.Build.Tasks.Templating" Version="9.0.0-beta.23508.1">
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>1d451c32dda2314c721adbf8829e1c0cd4e681ff</Sha>
<Sha>822f095b8c815dd7b9161140a9ff8151de593f82</Sha>
</Dependency>
<Dependency Name="Microsoft.DotNet.Helix.Sdk" Version="8.0.0-beta.23463.1">
<Dependency Name="Microsoft.DotNet.Helix.Sdk" Version="9.0.0-beta.23508.1">
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>1d451c32dda2314c721adbf8829e1c0cd4e681ff</Sha>
<Sha>822f095b8c815dd7b9161140a9ff8151de593f82</Sha>
</Dependency>
</ToolsetDependencies>
</Dependencies>
2 changes: 1 addition & 1 deletion eng/Versions.props
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
<MicrosoftNETCoreBrowserDebugHostTransportVersion>9.0.0-alpha.1.23511.18</MicrosoftNETCoreBrowserDebugHostTransportVersion>
</PropertyGroup>
<PropertyGroup Label="Dependencies from dotnet/arcade">
<MicrosoftDotNetBuildTasksTemplatingVersion>8.0.0-beta.23463.1</MicrosoftDotNetBuildTasksTemplatingVersion>
<MicrosoftDotNetBuildTasksTemplatingVersion>9.0.0-beta.23508.1</MicrosoftDotNetBuildTasksTemplatingVersion>
</PropertyGroup>
<PropertyGroup Label="Other dependencies">
<!-- NB: This version affects Visual Studio compatibility. See https://learn.microsoft.com/visualstudio/extensibility/roslyn-version-support -->
Expand Down
2 changes: 1 addition & 1 deletion eng/common/sdk-task.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ try {
$GlobalJson.tools | Add-Member -Name "vs" -Value (ConvertFrom-Json "{ `"version`": `"16.5`" }") -MemberType NoteProperty
}
if( -not ($GlobalJson.tools.PSObject.Properties.Name -match "xcopy-msbuild" )) {
$GlobalJson.tools | Add-Member -Name "xcopy-msbuild" -Value "17.6.0-2" -MemberType NoteProperty
$GlobalJson.tools | Add-Member -Name "xcopy-msbuild" -Value "17.7.2-1" -MemberType NoteProperty
}
if ($GlobalJson.tools."xcopy-msbuild".Trim() -ine "none") {
$xcopyMSBuildToolsFolder = InitializeXCopyMSBuild $GlobalJson.tools."xcopy-msbuild" -install $true
Expand Down
6 changes: 3 additions & 3 deletions eng/common/tools.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -379,13 +379,13 @@ function InitializeVisualStudioMSBuild([bool]$install, [object]$vsRequirements =
}

# Minimum VS version to require.
$vsMinVersionReqdStr = '17.6'
$vsMinVersionReqdStr = '17.7'
$vsMinVersionReqd = [Version]::new($vsMinVersionReqdStr)

# If the version of msbuild is going to be xcopied,
# use this version. Version matches a package here:
# https://dev.azure.com/dnceng/public/_artifacts/feed/dotnet-eng/NuGet/RoslynTools.MSBuild/versions/17.6.0-2
$defaultXCopyMSBuildVersion = '17.6.0-2'
# https://dev.azure.com/dnceng/public/_artifacts/feed/dotnet-eng/NuGet/RoslynTools.MSBuild/versions/17.7.2-1
$defaultXCopyMSBuildVersion = '17.7.2-1'

if (!$vsRequirements) {
if (Get-Member -InputObject $GlobalJson.tools -Name 'vs') {
Expand Down
4 changes: 2 additions & 2 deletions global.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
}
},
"msbuild-sdks": {
"Microsoft.DotNet.Arcade.Sdk": "8.0.0-beta.23463.1",
"Microsoft.DotNet.Helix.Sdk": "8.0.0-beta.23463.1"
"Microsoft.DotNet.Arcade.Sdk": "9.0.0-beta.23508.1",
"Microsoft.DotNet.Helix.Sdk": "9.0.0-beta.23508.1"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,8 @@ FROM root c
public override async Task KeylessEntity_by_database_view(bool async)
{
// Views are not supported.
Assert.Equal(
"0",
(await Assert.ThrowsAsync<EqualException>(
() => base.KeylessEntity_by_database_view(async))).Actual);
await Assert.ThrowsAsync<EqualException>(
() => base.KeylessEntity_by_database_view(async));

AssertSql(
"""
Expand All @@ -70,10 +68,9 @@ public override async Task Entity_mapped_to_view_on_right_side_of_join(bool asyn

public override async Task KeylessEntity_with_nav_defining_query(bool async)
{
Assert.Equal(
"0",
(await Assert.ThrowsAsync<EqualException>(
() => base.KeylessEntity_with_nav_defining_query(async))).Actual);
// Defining queries are not supported.
await Assert.ThrowsAsync<EqualException>(
() => base.KeylessEntity_with_nav_defining_query(async));

AssertSql(
"""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1993,9 +1993,7 @@ ORDER BY c["CustomerID"]
public override async Task Where_bitwise_or_with_logical_or(bool async)
{
// Bitwise operators on booleans. Issue #13168.
Assert.Equal(
"1",
(await Assert.ThrowsAsync<EqualException>(() => base.Where_bitwise_or_with_logical_or(async))).Actual);
await Assert.ThrowsAsync<EqualException>(() => base.Where_bitwise_or_with_logical_or(async));

AssertSql(
"""
Expand All @@ -2020,9 +2018,7 @@ FROM root c
public override async Task Where_bitwise_or_with_logical_and(bool async)
{
// Bitwise operators on booleans. Issue #13168.
Assert.Equal(
"0",
(await Assert.ThrowsAsync<EqualException>(() => base.Where_bitwise_or_with_logical_and(async))).Actual);
await Assert.ThrowsAsync<EqualException>(() => base.Where_bitwise_or_with_logical_and(async));

AssertSql(
"""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,9 +105,7 @@ FROM root c
public override async Task Where_bitwise_or(bool async)
{
// Bitwise operators on booleans. Issue #13168.
Assert.Equal(
"0",
(await Assert.ThrowsAsync<EqualException>(() => base.Where_bitwise_or(async))).Actual);
await Assert.ThrowsAsync<EqualException>(() => base.Where_bitwise_or(async));

AssertSql(
"""
Expand Down Expand Up @@ -800,9 +798,7 @@ FROM root c

public override async Task Where_simple_shadow_subquery(bool async)
{
Assert.Equal(
"5",
(await Assert.ThrowsAsync<EqualException>(() => base.Where_simple_shadow_subquery(async))).Actual);
await Assert.ThrowsAsync<EqualException>(() => base.Where_simple_shadow_subquery(async));

AssertSql(
"""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1007,16 +1007,14 @@ public class CosmosGenericOwnedTypes : GenericOwnedTypes
public override void Deriving_from_owned_type_throws()
// On Cosmos the base type starts as owned
=> Assert.Contains(
"(No exception was thrown)",
Assert.Throws<ThrowsException>(
() => base.Deriving_from_owned_type_throws()).Message);
"No exception was thrown",
Assert.Throws<ThrowsException>(base.Deriving_from_owned_type_throws).Message);

public override void Configuring_base_type_as_owned_throws()
// On Cosmos the base type starts as owned
=> Assert.Contains(
"(No exception was thrown)",
Assert.Throws<ThrowsException>(
() => base.Deriving_from_owned_type_throws()).Message);
"No exception was thrown",
Assert.Throws<ThrowsException>(base.Deriving_from_owned_type_throws).Message);

[ConditionalFact]
public virtual void Reference_type_is_discovered_as_owned()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -393,7 +393,7 @@ private static void MissingAnnotationCheck(
}
catch (Exception e)
{
Assert.False(true, $"Annotation '{annotationName}' was not handled by the code generator: {e.Message}");
Assert.Fail($"Annotation '{annotationName}' was not handled by the code generator: {e.Message}");
}

try
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,19 +99,12 @@ public override Task Include_after_SelectMany_throws(bool async)
=> Assert.ThrowsAsync<NullReferenceException>(() => base.Include_after_SelectMany_throws(async));

public override async Task Include_on_GroupJoin_SelectMany_DefaultIfEmpty_with_coalesce_result4(bool async)
=> Assert.Equal(
"4",
(((EqualException)(await Assert.ThrowsAsync<TargetInvocationException>(
() => base.Include_on_GroupJoin_SelectMany_DefaultIfEmpty_with_coalesce_result4(async))).InnerException!.InnerException)!)
.Actual);
=> await Assert.ThrowsAsync<TargetInvocationException>(
() => base.Include_on_GroupJoin_SelectMany_DefaultIfEmpty_with_coalesce_result4(async));

public override async Task Include_on_GroupJoin_SelectMany_DefaultIfEmpty_with_complex_projection_result(bool async)
=> Assert.Equal(
"6",
(((EqualException)(await Assert.ThrowsAsync<TargetInvocationException>(
() => base.Include_on_GroupJoin_SelectMany_DefaultIfEmpty_with_complex_projection_result(async)))
.InnerException!.InnerException)!)
.Actual);
=> await Assert.ThrowsAsync<TargetInvocationException>(
() => base.Include_on_GroupJoin_SelectMany_DefaultIfEmpty_with_complex_projection_result(async));

public override Task Null_semantics_is_correctly_applied_for_function_comparisons_that_take_arguments_from_optional_navigation(
bool async)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,5 @@ public override Task

public override async Task SelectMany_correlated_with_outer_3(bool async)
// DefaultIfEmpty. Issue #17536.
=> Assert.Equal(
"Madrid",
(await Assert.ThrowsAsync<EqualException>(() => base.SelectMany_correlated_with_outer_3(async))).Actual);
=> await Assert.ThrowsAsync<EqualException>(() => base.SelectMany_correlated_with_outer_3(async));
}
2 changes: 0 additions & 2 deletions test/EFCore.NativeAotTests/CompiledModels/UserEntityType.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType? ba
providerValueComparer: ValueComparer.CreateDefault<int>(favorStructuralComparisons: true),
sentinel: 0);
id.SetSetter((User e, int v) => e.Id = v);
id.SetGetter((User e) => e.Id, e => e.Id == default(int));
id.SetAccessors(new PropertyAccessors(
(InternalEntityEntry e) =>
((User)e.Entity).Id == 0
Expand Down Expand Up @@ -63,7 +62,6 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType? ba
valueComparer: ValueComparer.CreateDefault<string>(favorStructuralComparisons: false),
providerValueComparer: ValueComparer.CreateDefault<string>(favorStructuralComparisons: true));
name.SetSetter((User e, string v) => e.Name = v);
name.SetGetter((User e) => e.Name, e => e.Name == default(string));
name.SetAccessors(new PropertyAccessors(
(InternalEntityEntry e) => ((User)e.Entity).Name,
(InternalEntityEntry e) => ((User)e.Entity).Name,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -894,7 +894,7 @@ public virtual async Task Include_does_not_close_user_opened_connection_for_empt
? await query.ToArrayAsync()
: query.ToArray();

Assert.Empty(query);
Assert.False(query.Any());
Assert.Equal(ConnectionState.Open, connection.State);

context.Database.CloseConnection();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1392,7 +1392,7 @@ public virtual void Detects_duplicate_foreignKey_names_within_hierarchy_on_diffe

// Should throw. Issue #23144.
Assert.Contains(
"(No exception was thrown)",
"No exception was thrown",
Assert.Throws<ThrowsException>(
() => VerifyError(
RelationalStrings.DuplicateForeignKeyTableMismatch(
Expand Down
12 changes: 4 additions & 8 deletions test/EFCore.Relational.Tests/Update/CommandBatchPreparerTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -862,10 +862,8 @@ public void BatchCommands_creates_batch_on_incomplete_updates_for_shared_table_n
Assert.Equal(EntityState.Modified, command.EntityState);

// Detect indirect update dependencies. Issue #17947.
Assert.Equal(
"4",
Assert.Throws<EqualException>(
() => Assert.Equal(5, command.ColumnModifications.Count)).Actual);
Assert.Throws<EqualException>(
() => Assert.Equal(5, command.ColumnModifications.Count));
}

// var columnMod = command.ColumnModifications[0];
Expand Down Expand Up @@ -956,10 +954,8 @@ public void BatchCommands_creates_batch_on_incomplete_updates_for_shared_table_n
if (state == EntityState.Deleted)
{
// Detect indirect update dependencies. Issue #17947.
Assert.Equal(
"1",
Assert.Throws<EqualException>(
() => Assert.Equal(2, commandBatches.Count)).Actual);
Assert.Throws<EqualException>(
() => Assert.Equal(2, commandBatches.Count));
}
else
{
Expand Down
4 changes: 2 additions & 2 deletions test/EFCore.Specification.Tests/InterceptionTestBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -126,12 +126,12 @@ public void AssertEventsInOrder(params string[] eventNames)

if (indexFound < 0)
{
Assert.True(false, $"Event {eventNames[i]} not found.");
Assert.Fail($"Event {eventNames[i]} not found.");
}

if (indexFound < lastIndex)
{
Assert.True(false, $"Event {eventNames[i]} found before {eventNames[i - 1]}.");
Assert.Fail($"Event {eventNames[i]} found before {eventNames[i - 1]}.");
}

lastIndex = indexFound;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ public virtual Task Two_concurrency_issues_in_one_to_one_related_entities_can_be
try
{
c.SaveChanges();
Assert.True(false, "Expected second exception due to conflict in principals.");
Assert.Fail("Expected second exception due to conflict in principals.");
}
catch (DbUpdateConcurrencyException ex2)
{
Expand Down Expand Up @@ -185,7 +185,7 @@ public virtual Task Two_concurrency_issues_in_one_to_many_related_entities_can_b
try
{
c.SaveChanges();
Assert.True(false, "Expected second exception due to conflict in principals.");
Assert.Fail("Expected second exception due to conflict in principals.");
}
catch (DbUpdateConcurrencyException ex2)
{
Expand Down
26 changes: 10 additions & 16 deletions test/EFCore.Specification.Tests/Query/GearsOfWarQueryTestBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5567,40 +5567,34 @@ public virtual Task Navigation_based_on_complex_expression3(bool async)
[MemberData(nameof(IsAsyncData))]
public virtual async Task Navigation_based_on_complex_expression4(bool async)
// Nav expansion. Issue #17782.
=> Assert.Equal(
"True",
(await Assert.ThrowsAsync<EqualException>(
=> await Assert.ThrowsAsync<EqualException>(
() => AssertQuery(
async,
ss => from lc1 in ss.Set<Faction>().Select(f => (f is LocustHorde) ? ((LocustHorde)f).Commander : null)
from lc2 in ss.Set<LocustLeader>().OfType<LocustCommander>()
select (lc1 ?? lc2).DefeatedBy))).Actual);
select (lc1 ?? lc2).DefeatedBy));

[ConditionalTheory]
[MemberData(nameof(IsAsyncData))]
public virtual async Task Navigation_based_on_complex_expression5(bool async)
// Nav expansion. Issue #17782.
=> Assert.Equal(
"True",
(await Assert.ThrowsAsync<EqualException>(
=> await Assert.ThrowsAsync<EqualException>(
() => AssertQuery(
async,
ss => from lc1 in ss.Set<Faction>().OfType<LocustHorde>().Select(lh => lh.Commander)
join lc2 in ss.Set<LocustLeader>().OfType<LocustCommander>() on true equals true
select (lc1 ?? lc2).DefeatedBy))).Actual);
select (lc1 ?? lc2).DefeatedBy));

[ConditionalTheory]
[MemberData(nameof(IsAsyncData))]
public virtual async Task Navigation_based_on_complex_expression6(bool async)
// Nav expansion. Issue #17782.
=> Assert.Equal(
"True",
(await Assert.ThrowsAsync<EqualException>(
() => AssertQuery(
async,
ss => from lc1 in ss.Set<Faction>().OfType<LocustHorde>().Select(lh => lh.Commander)
join lc2 in ss.Set<LocustLeader>().OfType<LocustCommander>() on true equals true
select (lc1.Name == "Queen Myrrah" ? lc1 : lc2).DefeatedBy))).Actual);
=> await Assert.ThrowsAsync<EqualException>(
() => AssertQuery(
async,
ss => from lc1 in ss.Set<Faction>().OfType<LocustHorde>().Select(lh => lh.Commander)
join lc2 in ss.Set<LocustLeader>().OfType<LocustCommander>() on true equals true
select (lc1.Name == "Queen Myrrah" ? lc1 : lc2).DefeatedBy));

[ConditionalTheory]
[MemberData(nameof(IsAsyncData))]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -537,11 +537,8 @@ public virtual void Compiled_query_when_using_member_on_context()
context.TenantPrefix = "A";

// Parameter-specific evaluation in ParameterExtractor. Issue #19209.
Assert.Equal(
"4",
Assert.Throws<EqualException>(
() =>
Assert.Equal(6, query(context).Count())).Actual);
// Assert.Equal(6, query(context).Count())
Assert.Equal(4, query(context).Count());

context.TenantPrefix = "B";
Assert.Equal(4, query(context).Count());
Expand Down
2 changes: 1 addition & 1 deletion test/EFCore.Specification.Tests/TestUtilities/TestStore.cs
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ public DistributedTransactionListener()
}

private void DistributedTransactionStarted(object sender, TransactionEventArgs e)
=> Assert.False(true, "Distributed transaction started");
=> Assert.Fail("Distributed transaction started");

public void Dispose()
=> TransactionManager.DistributedTransactionStarted -= DistributedTransactionStarted;
Expand Down
Loading

0 comments on commit d4e344b

Please sign in to comment.