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' #31483

Merged
4 commits merged into from
Aug 16, 2023
Merged
Show file tree
Hide file tree
Changes from all 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
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.23411.1">
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="8.0.0-beta.23415.4">
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>9b2af35a6702526dc8a7c5fcadcc44efd0dca170</Sha>
<Sha>46ff142f43e887d5f9a4d87ef39d72166f61db8d</Sha>
</Dependency>
<Dependency Name="Microsoft.DotNet.Build.Tasks.Templating" Version="8.0.0-beta.23411.1">
<Dependency Name="Microsoft.DotNet.Build.Tasks.Templating" Version="8.0.0-beta.23415.4">
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>9b2af35a6702526dc8a7c5fcadcc44efd0dca170</Sha>
<Sha>46ff142f43e887d5f9a4d87ef39d72166f61db8d</Sha>
</Dependency>
<Dependency Name="Microsoft.DotNet.Helix.Sdk" Version="8.0.0-beta.23411.1">
<Dependency Name="Microsoft.DotNet.Helix.Sdk" Version="8.0.0-beta.23415.4">
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>9b2af35a6702526dc8a7c5fcadcc44efd0dca170</Sha>
<Sha>46ff142f43e887d5f9a4d87ef39d72166f61db8d</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>8.0.0-rc.1.23402.2</MicrosoftNETCoreBrowserDebugHostTransportVersion>
</PropertyGroup>
<PropertyGroup Label="Dependencies from dotnet/arcade">
<MicrosoftDotNetBuildTasksTemplatingVersion>8.0.0-beta.23411.1</MicrosoftDotNetBuildTasksTemplatingVersion>
<MicrosoftDotNetBuildTasksTemplatingVersion>8.0.0-beta.23415.4</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/SetupNugetSources.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ if ($dotnet31Source -ne $null) {
AddPackageSource -Sources $sources -SourceName "dotnet3.1-internal-transport" -SourceEndPoint "https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3.1-internal-transport/nuget/v2" -Creds $creds -Username $userName -Password $Password
}

$dotnetVersions = @('5','6','7')
$dotnetVersions = @('5','6','7','8')

foreach ($dotnetVersion in $dotnetVersions) {
$feedPrefix = "dotnet" + $dotnetVersion;
Expand Down
2 changes: 1 addition & 1 deletion eng/common/SetupNugetSources.sh
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ if [ "$?" == "0" ]; then
PackageSources+=('dotnet3.1-internal-transport')
fi

DotNetVersions=('5' '6' '7')
DotNetVersions=('5' '6' '7' '8')

for DotNetVersion in ${DotNetVersions[@]} ; do
FeedPrefix="dotnet${DotNetVersion}";
Expand Down
6 changes: 2 additions & 4 deletions eng/common/native/init-distro-rid.sh
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,6 @@ getNonPortableDistroRid()
# Input:
# os: (str)
# arch: (str)
# isPortable: (int)
# rootfsDir?: (nullable:string)
#
# Return:
Expand All @@ -97,10 +96,9 @@ initDistroRidGlobal()
{
local targetOs="$1"
local targetArch="$2"
local isPortable="$3"
local rootfsDir=""
if [ "$#" -ge 4 ]; then
rootfsDir="$4"
if [ "$#" -ge 3 ]; then
rootfsDir="$3"
fi

if [ -n "${rootfsDir}" ]; then
Expand Down
75 changes: 75 additions & 0 deletions eng/common/sdl/trim-assets-version.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
<#
.SYNOPSIS
Install and run the 'Microsoft.DotNet.VersionTools.Cli' tool with the 'trim-artifacts-version' command to trim the version from the NuGet assets file name.

.PARAMETER InputPath
Full path to directory where artifact packages are stored

.PARAMETER Recursive
Search for NuGet packages recursively

#>

Param(
[string] $InputPath,
[bool] $Recursive = $true
)

$CliToolName = "Microsoft.DotNet.VersionTools.Cli"

function Install-VersionTools-Cli {
param(
[Parameter(Mandatory=$true)][string]$Version
)

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")
Start-Process "$dotnet" -Verbose -ArgumentList $argumentList -NoNewWindow -Wait
}

# -------------------------------------------------------------------

if (!(Test-Path $InputPath)) {
Write-Host "Input Path '$InputPath' does not exist"
ExitWithExitCode 1
}

$ErrorActionPreference = 'Stop'
Set-StrictMode -Version 2.0

$disableConfigureToolsetImport = $true
$global:LASTEXITCODE = 0

# `tools.ps1` checks $ci to perform some actions. Since the SDL
# scripts don't necessarily execute in the same agent that run the
# build.ps1/sh script this variable isn't automatically set.
$ci = $true
. $PSScriptRoot\..\tools.ps1

try {
$dotnetRoot = InitializeDotNetCli -install:$true
$dotnet = "$dotnetRoot\dotnet.exe"

$toolsetVersion = Read-ArcadeSdkVersion
Install-VersionTools-Cli -Version $toolsetVersion

$cliToolFound = (& "$dotnet" tool list --local | Where-Object {$_.Split(' ')[0] -eq $CliToolName})
if ($null -eq $cliToolFound) {
Write-PipelineTelemetryError -Force -Category 'Sdl' -Message "The '$CliToolName' tool is not installed."
ExitWithExitCode 1
}

Exec-BlockVerbosely {
& "$dotnet" $CliToolName trim-assets-version `
--assets-path $InputPath `
--recursive $Recursive
Exit-IfNZEC "Sdl"
}
}
catch {
Write-Host $_
Write-PipelineTelemetryError -Force -Category 'Sdl' -Message $_
ExitWithExitCode 1
}
6 changes: 5 additions & 1 deletion eng/common/tools.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -671,14 +671,18 @@ function InitializeNativeTools() {
}
}

function Read-ArcadeSdkVersion() {
return $GlobalJson.'msbuild-sdks'.'Microsoft.DotNet.Arcade.Sdk'
}

function InitializeToolset() {
if (Test-Path variable:global:_ToolsetBuildProj) {
return $global:_ToolsetBuildProj
}

$nugetCache = GetNuGetPackageCachePath

$toolsetVersion = $GlobalJson.'msbuild-sdks'.'Microsoft.DotNet.Arcade.Sdk'
$toolsetVersion = Read-ArcadeSdkVersion
$toolsetLocationFile = Join-Path $ToolsetDir "$toolsetVersion.txt"

if (Test-Path $toolsetLocationFile) {
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.23411.1",
"Microsoft.DotNet.Helix.Sdk": "8.0.0-beta.23411.1"
"Microsoft.DotNet.Arcade.Sdk": "8.0.0-beta.23415.4",
"Microsoft.DotNet.Helix.Sdk": "8.0.0-beta.23415.4"
}
}
152 changes: 152 additions & 0 deletions src/EFCore/ChangeTracking/ComplexPropertyEntry.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,152 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.

using Microsoft.EntityFrameworkCore.ChangeTracking.Internal;
using Microsoft.EntityFrameworkCore.Metadata.Internal;

namespace Microsoft.EntityFrameworkCore.ChangeTracking;

/// <summary>
/// Provides access to change tracking information and operations for a given property of a complex type.
/// </summary>
/// <remarks>
/// <para>
/// Instances of this class are returned from methods when using the <see cref="ChangeTracker" /> API and it is
/// not designed to be directly constructed in your application code.
/// </para>
/// <para>
/// See <see href="https://aka.ms/efcore-docs-entity-entries">Accessing tracked entities in EF Core</see> for more information and
/// examples.
/// </para>
/// </remarks>
public class ComplexPropertyEntry : MemberEntry
{
/// <summary>
/// This is an internal API that supports the Entity Framework Core infrastructure and not subject to
/// the same compatibility standards as public APIs. It may be changed or removed without notice in
/// any release. You should only use it directly in your code with extreme caution and knowing that
/// doing so can result in application failures when updating to a new Entity Framework Core release.
/// </summary>
[EntityFrameworkInternal]
public ComplexPropertyEntry(InternalEntityEntry internalEntry, IComplexProperty complexProperty)
: base(internalEntry, complexProperty)
{
}

/// <summary>
/// Gets or sets a value indicating whether any of the properties of the complex type have been modified
/// and should be updated in the database when <see cref="DbContext.SaveChanges()" /> is called.
/// </summary>
/// <remarks>
/// <para>
/// Setting this value causes all of the properties of the complex type to be marked as modified or not as appropriate.
/// </para>
/// <para>
/// See <see href="https://aka.ms/efcore-docs-entity-entries">Accessing tracked entities in EF Core</see> for more information and
/// examples.
/// </para>
/// </remarks>
public override bool IsModified
{
get => Metadata.ComplexType.GetFlattenedProperties().Any(property => InternalEntry.IsModified(property));
set
{
foreach (var property in Metadata.ComplexType.GetFlattenedProperties())
{
InternalEntry.SetPropertyModified(property, isModified: value);
}
}
}

/// <summary>
/// Gets the metadata that describes the facets of this property and how it maps to the database.
/// </summary>
public new virtual IComplexProperty Metadata
=> (IComplexProperty)base.Metadata;

/// <summary>
/// Provides access to change tracking information and operations for a given property of this complex type.
/// </summary>
/// <remarks>
/// See <see href="https://aka.ms/efcore-docs-entity-entries">Accessing tracked entities in EF Core</see> for more information and
/// examples.
/// </remarks>
/// <param name="property">The property to access information and operations for.</param>
/// <returns>An object that exposes change tracking information and operations for the given property.</returns>
public virtual PropertyEntry Property(IProperty property)
{
Check.NotNull(property, nameof(property));

return new PropertyEntry(InternalEntry, property);
}

/// <summary>
/// Provides access to change tracking information and operations for a given property of this complex type.
/// </summary>
/// <remarks>
/// See <see href="https://aka.ms/efcore-docs-entity-entries">Accessing tracked entities in EF Core</see> for more information and
/// examples.
/// </remarks>
/// <param name="propertyName">The property to access information and operations for.</param>
/// <returns>An object that exposes change tracking information and operations for the given property.</returns>
public virtual PropertyEntry Property(string propertyName)
{
Check.NotEmpty(propertyName, nameof(propertyName));

return new PropertyEntry(InternalEntry, Metadata.ComplexType.GetProperty(propertyName));
}

/// <summary>
/// Provides access to change tracking information and operations for all properties of this complex type.
/// </summary>
/// <remarks>
/// See <see href="https://aka.ms/efcore-docs-entity-entries">Accessing tracked entities in EF Core</see> for more information and
/// examples.
/// </remarks>
public virtual IEnumerable<PropertyEntry> Properties
=> Metadata.ComplexType.GetProperties().Select(property => new PropertyEntry(InternalEntry, property));

/// <summary>
/// Provides access to change tracking information and operations for a given property of a nested complex type on this
/// complex type.
/// </summary>
/// <remarks>
/// See <see href="https://aka.ms/efcore-docs-entity-entries">Accessing tracked entities in EF Core</see> for more information and
/// examples.
/// </remarks>
/// <param name="property">The property to access information and operations for.</param>
/// <returns>An object that exposes change tracking information and operations for the given property.</returns>
public virtual ComplexPropertyEntry ComplexProperty(IComplexProperty property)
{
Check.NotNull(property, nameof(property));

return new ComplexPropertyEntry(InternalEntry, property);
}

/// <summary>
/// Provides access to change tracking information and operations for a given property of a nested complex type on this
/// complex type.
/// </summary>
/// <remarks>
/// See <see href="https://aka.ms/efcore-docs-entity-entries">Accessing tracked entities in EF Core</see> for more information and
/// examples.
/// </remarks>
/// <param name="propertyName">The property to access information and operations for.</param>
/// <returns>An object that exposes change tracking information and operations for the given property.</returns>
public virtual ComplexPropertyEntry ComplexProperty(string propertyName)
{
Check.NotEmpty(propertyName, nameof(propertyName));

return new ComplexPropertyEntry(InternalEntry, Metadata.ComplexType.GetComplexProperty(propertyName));
}

/// <summary>
/// Provides access to change tracking information and operations for all properties of nested complex types on this complex type.
/// </summary>
/// <remarks>
/// See <see href="https://aka.ms/efcore-docs-entity-entries">Accessing tracked entities in EF Core</see> for more information and
/// examples.
/// </remarks>
public virtual IEnumerable<ComplexPropertyEntry> ComplexProperties
=> Metadata.ComplexType.GetComplexProperties().Select(property => new ComplexPropertyEntry(InternalEntry, property));
}
Loading