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

[automated] Merge branch 'release/8.0' => 'main' #31516

Merged
merged 5 commits into from
Aug 20, 2023
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
64 changes: 32 additions & 32 deletions eng/Version.Details.xml
Original file line number Diff line number Diff line change
@@ -1,72 +1,72 @@
<?xml version="1.0" encoding="utf-8"?>
<Dependencies>
<ProductDependencies>
<Dependency Name="Microsoft.Extensions.Caching.Memory" Version="8.0.0-rc.1.23402.2">
<Dependency Name="Microsoft.Extensions.Caching.Memory" Version="8.0.0-rc.2.23418.14">
<Uri>https://github.com/dotnet/runtime</Uri>
<Sha>0d6d6c343556d8aaae49347c82b09281f8968196</Sha>
<Sha>90b92bb265a412592c4c152983d7b30c92236dbe</Sha>
</Dependency>
<Dependency Name="Microsoft.Extensions.Configuration.EnvironmentVariables" Version="8.0.0-rc.1.23402.2">
<Dependency Name="Microsoft.Extensions.Configuration.EnvironmentVariables" Version="8.0.0-rc.2.23418.14">
<Uri>https://github.com/dotnet/runtime</Uri>
<Sha>0d6d6c343556d8aaae49347c82b09281f8968196</Sha>
<Sha>90b92bb265a412592c4c152983d7b30c92236dbe</Sha>
</Dependency>
<Dependency Name="Microsoft.Extensions.Configuration.Abstractions" Version="8.0.0-rc.1.23402.2">
<Dependency Name="Microsoft.Extensions.Configuration.Abstractions" Version="8.0.0-rc.2.23418.14">
<Uri>https://github.com/dotnet/runtime</Uri>
<Sha>0d6d6c343556d8aaae49347c82b09281f8968196</Sha>
<Sha>90b92bb265a412592c4c152983d7b30c92236dbe</Sha>
</Dependency>
<Dependency Name="Microsoft.Extensions.Configuration.Json" Version="8.0.0-rc.1.23402.2">
<Dependency Name="Microsoft.Extensions.Configuration.Json" Version="8.0.0-rc.2.23418.14">
<Uri>https://github.com/dotnet/runtime</Uri>
<Sha>0d6d6c343556d8aaae49347c82b09281f8968196</Sha>
<Sha>90b92bb265a412592c4c152983d7b30c92236dbe</Sha>
</Dependency>
<Dependency Name="Microsoft.Extensions.Configuration" Version="8.0.0-rc.1.23402.2">
<Dependency Name="Microsoft.Extensions.Configuration" Version="8.0.0-rc.2.23418.14">
<Uri>https://github.com/dotnet/runtime</Uri>
<Sha>0d6d6c343556d8aaae49347c82b09281f8968196</Sha>
<Sha>90b92bb265a412592c4c152983d7b30c92236dbe</Sha>
</Dependency>
<Dependency Name="Microsoft.Extensions.DependencyInjection" Version="8.0.0-rc.1.23402.2">
<Dependency Name="Microsoft.Extensions.DependencyInjection" Version="8.0.0-rc.2.23418.14">
<Uri>https://github.com/dotnet/runtime</Uri>
<Sha>0d6d6c343556d8aaae49347c82b09281f8968196</Sha>
<Sha>90b92bb265a412592c4c152983d7b30c92236dbe</Sha>
</Dependency>
<Dependency Name="Microsoft.Extensions.DependencyModel" Version="8.0.0-rc.1.23402.2">
<Dependency Name="Microsoft.Extensions.DependencyModel" Version="8.0.0-rc.2.23418.14">
<Uri>https://github.com/dotnet/runtime</Uri>
<Sha>0d6d6c343556d8aaae49347c82b09281f8968196</Sha>
<Sha>90b92bb265a412592c4c152983d7b30c92236dbe</Sha>
</Dependency>
<Dependency Name="Microsoft.Extensions.HostFactoryResolver.Sources" Version="8.0.0-rc.1.23402.2">
<Dependency Name="Microsoft.Extensions.HostFactoryResolver.Sources" Version="8.0.0-rc.2.23418.14">
<Uri>https://github.com/dotnet/runtime</Uri>
<Sha>0d6d6c343556d8aaae49347c82b09281f8968196</Sha>
<Sha>90b92bb265a412592c4c152983d7b30c92236dbe</Sha>
</Dependency>
<Dependency Name="Microsoft.Extensions.Logging" Version="8.0.0-rc.1.23402.2">
<Dependency Name="Microsoft.Extensions.Logging" Version="8.0.0-rc.2.23418.14">
<Uri>https://github.com/dotnet/runtime</Uri>
<Sha>0d6d6c343556d8aaae49347c82b09281f8968196</Sha>
<Sha>90b92bb265a412592c4c152983d7b30c92236dbe</Sha>
</Dependency>
<Dependency Name="System.Text.Json" Version="8.0.0-rc.1.23402.2">
<Dependency Name="System.Text.Json" Version="8.0.0-rc.2.23418.14">
<Uri>https://github.com/dotnet/runtime</Uri>
<Sha>0d6d6c343556d8aaae49347c82b09281f8968196</Sha>
<Sha>90b92bb265a412592c4c152983d7b30c92236dbe</Sha>
</Dependency>
<Dependency Name="Microsoft.NETCore.App.Ref" Version="8.0.0-rc.1.23402.2">
<Dependency Name="Microsoft.NETCore.App.Ref" Version="8.0.0-rc.2.23418.14">
<Uri>https://github.com/dotnet/runtime</Uri>
<Sha>0d6d6c343556d8aaae49347c82b09281f8968196</Sha>
<Sha>90b92bb265a412592c4c152983d7b30c92236dbe</Sha>
</Dependency>
<Dependency Name="Microsoft.NETCore.App.Runtime.win-x64" Version="8.0.0-rc.1.23402.2">
<Dependency Name="Microsoft.NETCore.App.Runtime.win-x64" Version="8.0.0-rc.2.23418.14">
<Uri>https://github.com/dotnet/runtime</Uri>
<Sha>0d6d6c343556d8aaae49347c82b09281f8968196</Sha>
<Sha>90b92bb265a412592c4c152983d7b30c92236dbe</Sha>
</Dependency>
<!-- NB: Using BrowserDebugHost to represent the nonshipping version of Microsoft.NETCore.App -->
<Dependency Name="Microsoft.NETCore.BrowserDebugHost.Transport" Version="8.0.0-rc.1.23402.2">
<Dependency Name="Microsoft.NETCore.BrowserDebugHost.Transport" Version="8.0.0-rc.2.23418.14">
<Uri>https://github.com/dotnet/runtime</Uri>
<Sha>0d6d6c343556d8aaae49347c82b09281f8968196</Sha>
<Sha>90b92bb265a412592c4c152983d7b30c92236dbe</Sha>
</Dependency>
</ProductDependencies>
<ToolsetDependencies>
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="8.0.0-beta.23415.4">
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="8.0.0-beta.23417.3">
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>46ff142f43e887d5f9a4d87ef39d72166f61db8d</Sha>
<Sha>7837a0b504ed9a598daebd50f20520ccda5fe2b1</Sha>
</Dependency>
<Dependency Name="Microsoft.DotNet.Build.Tasks.Templating" Version="8.0.0-beta.23415.4">
<Dependency Name="Microsoft.DotNet.Build.Tasks.Templating" Version="8.0.0-beta.23417.3">
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>46ff142f43e887d5f9a4d87ef39d72166f61db8d</Sha>
<Sha>7837a0b504ed9a598daebd50f20520ccda5fe2b1</Sha>
</Dependency>
<Dependency Name="Microsoft.DotNet.Helix.Sdk" Version="8.0.0-beta.23415.4">
<Dependency Name="Microsoft.DotNet.Helix.Sdk" Version="8.0.0-beta.23417.3">
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>46ff142f43e887d5f9a4d87ef39d72166f61db8d</Sha>
<Sha>7837a0b504ed9a598daebd50f20520ccda5fe2b1</Sha>
</Dependency>
</ToolsetDependencies>
</Dependencies>
28 changes: 14 additions & 14 deletions eng/Versions.props
Original file line number Diff line number Diff line change
Expand Up @@ -16,22 +16,22 @@
<UsingToolXliff>False</UsingToolXliff>
</PropertyGroup>
<PropertyGroup Label="Dependencies from dotnet/runtime">
<MicrosoftExtensionsCachingMemoryVersion>8.0.0-rc.1.23402.2</MicrosoftExtensionsCachingMemoryVersion>
<MicrosoftExtensionsConfigurationVersion>8.0.0-rc.1.23402.2</MicrosoftExtensionsConfigurationVersion>
<MicrosoftExtensionsConfigurationAbstractionsVersion>8.0.0-rc.1.23402.2</MicrosoftExtensionsConfigurationAbstractionsVersion>
<MicrosoftExtensionsConfigurationEnvironmentVariablesVersion>8.0.0-rc.1.23402.2</MicrosoftExtensionsConfigurationEnvironmentVariablesVersion>
<MicrosoftExtensionsConfigurationJsonVersion>8.0.0-rc.1.23402.2</MicrosoftExtensionsConfigurationJsonVersion>
<MicrosoftExtensionsDependencyInjectionVersion>8.0.0-rc.1.23402.2</MicrosoftExtensionsDependencyInjectionVersion>
<MicrosoftExtensionsDependencyModelVersion>8.0.0-rc.1.23402.2</MicrosoftExtensionsDependencyModelVersion>
<MicrosoftExtensionsHostFactoryResolverSourcesVersion>8.0.0-rc.1.23402.2</MicrosoftExtensionsHostFactoryResolverSourcesVersion>
<MicrosoftExtensionsLoggingVersion>8.0.0-rc.1.23402.2</MicrosoftExtensionsLoggingVersion>
<SystemTextJsonVersion>8.0.0-rc.1.23402.2</SystemTextJsonVersion>
<MicrosoftNETCoreAppRefVersion>8.0.0-rc.1.23402.2</MicrosoftNETCoreAppRefVersion>
<MicrosoftNETCoreAppRuntimewinx64Version>8.0.0-rc.1.23402.2</MicrosoftNETCoreAppRuntimewinx64Version>
<MicrosoftNETCoreBrowserDebugHostTransportVersion>8.0.0-rc.1.23402.2</MicrosoftNETCoreBrowserDebugHostTransportVersion>
<MicrosoftExtensionsCachingMemoryVersion>8.0.0-rc.2.23418.14</MicrosoftExtensionsCachingMemoryVersion>
<MicrosoftExtensionsConfigurationVersion>8.0.0-rc.2.23418.14</MicrosoftExtensionsConfigurationVersion>
<MicrosoftExtensionsConfigurationAbstractionsVersion>8.0.0-rc.2.23418.14</MicrosoftExtensionsConfigurationAbstractionsVersion>
<MicrosoftExtensionsConfigurationEnvironmentVariablesVersion>8.0.0-rc.2.23418.14</MicrosoftExtensionsConfigurationEnvironmentVariablesVersion>
<MicrosoftExtensionsConfigurationJsonVersion>8.0.0-rc.2.23418.14</MicrosoftExtensionsConfigurationJsonVersion>
<MicrosoftExtensionsDependencyInjectionVersion>8.0.0-rc.2.23418.14</MicrosoftExtensionsDependencyInjectionVersion>
<MicrosoftExtensionsDependencyModelVersion>8.0.0-rc.2.23418.14</MicrosoftExtensionsDependencyModelVersion>
<MicrosoftExtensionsHostFactoryResolverSourcesVersion>8.0.0-rc.2.23418.14</MicrosoftExtensionsHostFactoryResolverSourcesVersion>
<MicrosoftExtensionsLoggingVersion>8.0.0-rc.2.23418.14</MicrosoftExtensionsLoggingVersion>
<SystemTextJsonVersion>8.0.0-rc.2.23418.14</SystemTextJsonVersion>
<MicrosoftNETCoreAppRefVersion>8.0.0-rc.2.23418.14</MicrosoftNETCoreAppRefVersion>
<MicrosoftNETCoreAppRuntimewinx64Version>8.0.0-rc.2.23418.14</MicrosoftNETCoreAppRuntimewinx64Version>
<MicrosoftNETCoreBrowserDebugHostTransportVersion>8.0.0-rc.2.23418.14</MicrosoftNETCoreBrowserDebugHostTransportVersion>
</PropertyGroup>
<PropertyGroup Label="Dependencies from dotnet/arcade">
<MicrosoftDotNetBuildTasksTemplatingVersion>8.0.0-beta.23415.4</MicrosoftDotNetBuildTasksTemplatingVersion>
<MicrosoftDotNetBuildTasksTemplatingVersion>8.0.0-beta.23417.3</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/native/init-compiler.sh
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ if [ -z "$CLR_CC" ]; then
# Set default versions
if [ -z "$majorVersion" ]; then
# note: gcc (all versions) and clang versions higher than 6 do not have minor version in file name, if it is zero.
if [ "$compiler" = "clang" ]; then versions="16 15 14 13 12 11 10 9 8 7 6.0 5.0 4.0 3.9 3.8 3.7 3.6 3.5"
if [ "$compiler" = "clang" ]; then versions="17 16 15 14 13 12 11 10 9 8 7 6.0 5.0 4.0 3.9 3.8 3.7 3.6 3.5"
elif [ "$compiler" = "gcc" ]; then versions="13 12 11 10 9 8 7 6 5 4.9"; fi

for version in $versions; do
Expand Down
2 changes: 1 addition & 1 deletion eng/common/sdl/trim-assets-version.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ function Install-VersionTools-Cli {
Write-Host "Installing the package '$CliToolName' with a version of '$version' ..."
$feed = "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng/nuget/v3/index.json"

$argumentList = @("tool", "install", "--local", "$CliToolName", "--add-source $feed", "--no-cache", "--version $Version")
$argumentList = @("tool", "install", "--local", "$CliToolName", "--add-source $feed", "--no-cache", "--version $Version", "--create-manifest-if-needed")
Start-Process "$dotnet" -Verbose -ArgumentList $argumentList -NoNewWindow -Wait
}

Expand Down
5 changes: 5 additions & 0 deletions eng/common/templates/job/execute-sdl.yml
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,11 @@ jobs:
downloadPath: $(Build.ArtifactStagingDirectory)\artifacts
checkDownloadedFiles: true

- powershell: eng/common/sdl/trim-assets-version.ps1
-InputPath $(Build.ArtifactStagingDirectory)\artifacts
displayName: Trim the version from the NuGet packages
continueOnError: ${{ parameters.sdlContinueOnError }}

- powershell: eng/common/sdl/extract-artifact-packages.ps1
-InputPath $(Build.ArtifactStagingDirectory)\artifacts\BlobArtifacts
-ExtractPath $(Build.ArtifactStagingDirectory)\artifacts\BlobArtifacts
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.23415.4",
"Microsoft.DotNet.Helix.Sdk": "8.0.0-beta.23415.4"
"Microsoft.DotNet.Arcade.Sdk": "8.0.0-beta.23417.3",
"Microsoft.DotNet.Helix.Sdk": "8.0.0-beta.23417.3"
}
}
1 change: 1 addition & 0 deletions src/EFCore/Storage/Json/JsonSignedEnumReaderWriter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ namespace Microsoft.EntityFrameworkCore.Storage.Json;
/// Reads and writes JSON for <see langword="enum" /> values backed by a signed integer.
/// </summary>
public sealed class JsonSignedEnumReaderWriter<TEnum> : JsonValueReaderWriter<TEnum>
where TEnum : struct, Enum
{
/// <summary>
/// The singleton instance of this stateless reader/writer.
Expand Down
1 change: 1 addition & 0 deletions src/EFCore/Storage/Json/JsonUnsignedEnumReaderWriter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ namespace Microsoft.EntityFrameworkCore.Storage.Json;
/// Reads and writes JSON for <see langword="enum" /> values backed by an unsigned integer.
/// </summary>
public sealed class JsonUnsignedEnumReaderWriter<TEnum> : JsonValueReaderWriter<TEnum>
where TEnum : struct, Enum
{
/// <summary>
/// The singleton instance of this stateless reader/writer.
Expand Down
2 changes: 1 addition & 1 deletion src/EFCore/Storage/Json/JsonWarningEnumReaderWriter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ namespace Microsoft.EntityFrameworkCore.Storage.Json;
/// happens, a warning is generated.
/// </summary>
public sealed class JsonWarningEnumReaderWriter<TEnum> : JsonValueReaderWriter<TEnum>
where TEnum : struct
where TEnum : struct, Enum
{
/// <summary>
/// The singleton instance of this stateless reader/writer.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ namespace Microsoft.EntityFrameworkCore.Storage.ValueConversion;
/// See <see href="https://aka.ms/efcore-docs-value-converters">EF Core value converters</see> for more information and examples.
/// </remarks>
public class EnumToNumberConverter<TEnum, TNumber> : ValueConverter<TEnum, TNumber>
where TEnum : struct
where TEnum : struct, Enum
where TNumber : struct
{
// ReSharper disable once StaticMemberInGenericType
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ namespace Microsoft.EntityFrameworkCore.Storage.ValueConversion;
/// See <see href="https://aka.ms/efcore-docs-value-converters">EF Core value converters</see> for more information and examples.
/// </remarks>
public class EnumToStringConverter<TEnum> : StringEnumConverter<TEnum, string, TEnum>
where TEnum : struct
where TEnum : struct, Enum
{
/// <summary>
/// Creates a new instance of this converter. This converter does not preserve order.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ namespace Microsoft.EntityFrameworkCore.Storage.ValueConversion.Internal;
/// doing so can result in application failures when updating to a new Entity Framework Core release.
/// </summary>
public class StringEnumConverter<TModel, TProvider, TEnum> : ValueConverter<TModel, TProvider>
where TEnum : struct
where TEnum : struct, Enum
{
/// <summary>
/// This is an internal API that supports the Entity Framework Core infrastructure and not subject to
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ namespace Microsoft.EntityFrameworkCore.Storage.ValueConversion;
/// See <see href="https://aka.ms/efcore-docs-value-converters">EF Core value converters</see> for more information and examples.
/// </remarks>
public class StringToEnumConverter<TEnum> : StringEnumConverter<string, TEnum, TEnum>
where TEnum : struct
where TEnum : struct, Enum
{
/// <summary>
/// Creates a new instance of this converter. This converter does not preserve order.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public override Guid Next(EntityEntry entry)
Check.DebugAssert(succeeded, "Could not write Guid to Span");
var incrementedCounter = Interlocked.Increment(ref _counter);
Span<byte> counterBytes = stackalloc byte[sizeof(long)];
MemoryMarshal.Write(counterBytes, ref incrementedCounter);
MemoryMarshal.Write(counterBytes, in incrementedCounter);

if (!BitConverter.IsLittleEndian)
{
Expand Down
20 changes: 0 additions & 20 deletions test/EFCore.Tests/Storage/EnumToNumberConverterTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -265,26 +265,6 @@ public void Can_convert_ulongs_to_enums()
Assert.Equal(default, converter(0));
}

[ConditionalFact]
public void Enum_to_integer_converter_throws_for_bad_types()
{
Assert.Equal(
CoreStrings.ConverterBadType(
typeof(EnumToNumberConverter<Guid, int>).ShortDisplayName(),
"Guid",
"enum types"),
Assert.Throws<InvalidOperationException>(
() => new EnumToNumberConverter<Guid, int>()).Message);

Assert.Equal(
CoreStrings.ConverterBadType(
typeof(EnumToNumberConverter<Beatles, Guid>).ShortDisplayName(),
"Guid",
"'int', 'long', 'short', 'byte', 'uint', 'ulong', 'ushort', 'sbyte', 'double', 'float', 'decimal'"),
Assert.Throws<InvalidOperationException>(
() => new EnumToNumberConverter<Beatles, Guid>()).Message);
}

private enum Beatles
{
John = 7,
Expand Down
10 changes: 0 additions & 10 deletions test/EFCore.Tests/Storage/EnumToStringConverterTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -77,16 +77,6 @@ public void Can_convert_strings_to_enums_object()
Assert.Null(converter(null));
}

[ConditionalFact]
public void Enum_to_string_converter_throws_for_bad_types()
=> Assert.Equal(
CoreStrings.ConverterBadType(
typeof(StringEnumConverter<Guid, string, Guid>).ShortDisplayName(),
"Guid",
"enum types"),
Assert.Throws<InvalidOperationException>(
() => new EnumToStringConverter<Guid>()).Message);

private enum Beatles
{
John = 7,
Expand Down
10 changes: 0 additions & 10 deletions test/EFCore.Tests/Storage/StringToEnumConverterTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -78,16 +78,6 @@ public void Can_convert_enums_to_strings_object()
Assert.Null(converter(null));
}

[ConditionalFact]
public void String_to_enum_converter_throws_for_bad_types()
=> Assert.Equal(
CoreStrings.ConverterBadType(
typeof(StringEnumConverter<string, Guid, Guid>).ShortDisplayName(),
"Guid",
"enum types"),
Assert.Throws<InvalidOperationException>(
() => new StringToEnumConverter<Guid>()).Message);

private enum Beatles
{
John = 7,
Expand Down