Skip to content

Commit

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


 - Update Blazor WASM baselines

 - Update BlazorWebAssembly test baselines

 - Handle analyzers from targeting packs in tests

 - Update baselines
  • Loading branch information
dotnet-maestro[bot] committed Nov 11, 2021
1 parent 3e478b8 commit de390be
Show file tree
Hide file tree
Showing 50 changed files with 4,355 additions and 4,152 deletions.
56 changes: 28 additions & 28 deletions eng/Version.Details.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,41 +26,41 @@
<Uri>https://github.com/dotnet/templating</Uri>
<Sha>7669cc78ac5d15ad0ee5b68e65d7d6f753fe918b</Sha>
</Dependency>
<Dependency Name="Microsoft.NETCore.App.Ref" Version="7.0.0-alpha.1.21551.1">
<Dependency Name="Microsoft.NETCore.App.Ref" Version="7.0.0-alpha.1.21561.1">
<Uri>https://github.com/dotnet/runtime</Uri>
<Sha>2a87ffeaedb6b534d6eaa000d5ba9b545f4aac1e</Sha>
<Sha>6f5de0b2b979a70e6fe36904d0d4f087c32f9c7e</Sha>
</Dependency>
<Dependency Name="VS.Redist.Common.NetCore.SharedFramework.x64.7.0" Version="7.0.0-alpha.1.21551.1">
<Dependency Name="VS.Redist.Common.NetCore.SharedFramework.x64.7.0" Version="7.0.0-alpha.1.21561.1">
<Uri>https://github.com/dotnet/runtime</Uri>
<Sha>2a87ffeaedb6b534d6eaa000d5ba9b545f4aac1e</Sha>
<Sha>6f5de0b2b979a70e6fe36904d0d4f087c32f9c7e</Sha>
</Dependency>
<Dependency Name="VS.Redist.Common.NetCore.TargetingPack.x64.7.0" Version="7.0.0-alpha.1.21551.1">
<Dependency Name="VS.Redist.Common.NetCore.TargetingPack.x64.7.0" Version="7.0.0-alpha.1.21561.1">
<Uri>https://github.com/dotnet/runtime</Uri>
<Sha>2a87ffeaedb6b534d6eaa000d5ba9b545f4aac1e</Sha>
<Sha>6f5de0b2b979a70e6fe36904d0d4f087c32f9c7e</Sha>
</Dependency>
<Dependency Name="Microsoft.NETCore.App.Runtime.win-x64" Version="7.0.0-alpha.1.21551.1">
<Dependency Name="Microsoft.NETCore.App.Runtime.win-x64" Version="7.0.0-alpha.1.21561.1">
<Uri>https://github.com/dotnet/runtime</Uri>
<Sha>2a87ffeaedb6b534d6eaa000d5ba9b545f4aac1e</Sha>
<Sha>6f5de0b2b979a70e6fe36904d0d4f087c32f9c7e</Sha>
</Dependency>
<Dependency Name="Microsoft.NETCore.App.Host.win-x64" Version="7.0.0-alpha.1.21551.1">
<Dependency Name="Microsoft.NETCore.App.Host.win-x64" Version="7.0.0-alpha.1.21561.1">
<Uri>https://github.com/dotnet/runtime</Uri>
<Sha>2a87ffeaedb6b534d6eaa000d5ba9b545f4aac1e</Sha>
<Sha>6f5de0b2b979a70e6fe36904d0d4f087c32f9c7e</Sha>
</Dependency>
<Dependency Name="Microsoft.NETCore.Platforms" Version="7.0.0-alpha.1.21551.1">
<Dependency Name="Microsoft.NETCore.Platforms" Version="7.0.0-alpha.1.21561.1">
<Uri>https://github.com/dotnet/runtime</Uri>
<Sha>2a87ffeaedb6b534d6eaa000d5ba9b545f4aac1e</Sha>
<Sha>6f5de0b2b979a70e6fe36904d0d4f087c32f9c7e</Sha>
</Dependency>
<Dependency Name="Microsoft.NET.HostModel" Version="7.0.0-alpha.1.21551.1">
<Dependency Name="Microsoft.NET.HostModel" Version="7.0.0-alpha.1.21561.1">
<Uri>https://github.com/dotnet/runtime</Uri>
<Sha>2a87ffeaedb6b534d6eaa000d5ba9b545f4aac1e</Sha>
<Sha>6f5de0b2b979a70e6fe36904d0d4f087c32f9c7e</Sha>
</Dependency>
<Dependency Name="Microsoft.Extensions.DependencyModel" Version="7.0.0-alpha.1.21551.1">
<Dependency Name="Microsoft.Extensions.DependencyModel" Version="7.0.0-alpha.1.21561.1">
<Uri>https://github.com/dotnet/runtime</Uri>
<Sha>2a87ffeaedb6b534d6eaa000d5ba9b545f4aac1e</Sha>
<Sha>6f5de0b2b979a70e6fe36904d0d4f087c32f9c7e</Sha>
</Dependency>
<Dependency Name="Microsoft.NETCore.DotNetHostResolver" Version="7.0.0-alpha.1.21551.1">
<Dependency Name="Microsoft.NETCore.DotNetHostResolver" Version="7.0.0-alpha.1.21561.1">
<Uri>https://github.com/dotnet/runtime</Uri>
<Sha>2a87ffeaedb6b534d6eaa000d5ba9b545f4aac1e</Sha>
<Sha>6f5de0b2b979a70e6fe36904d0d4f087c32f9c7e</Sha>
</Dependency>
<Dependency Name="Microsoft.Build" Version="17.1.0-preview-21559-03">
<Uri>https://github.com/dotnet/msbuild</Uri>
Expand Down Expand Up @@ -133,21 +133,21 @@
<Uri>https://github.com/dotnet/linker</Uri>
<Sha>3d3f294ff916bff54350d04143d0ef212c29ebb7</Sha>
</Dependency>
<Dependency Name="System.CodeDom" Version="7.0.0-alpha.1.21551.1">
<Dependency Name="System.CodeDom" Version="7.0.0-alpha.1.21561.1">
<Uri>https://github.com/dotnet/runtime</Uri>
<Sha>2a87ffeaedb6b534d6eaa000d5ba9b545f4aac1e</Sha>
<Sha>6f5de0b2b979a70e6fe36904d0d4f087c32f9c7e</Sha>
</Dependency>
<Dependency Name="System.Security.Cryptography.ProtectedData" Version="7.0.0-alpha.1.21551.1">
<Dependency Name="System.Security.Cryptography.ProtectedData" Version="7.0.0-alpha.1.21561.1">
<Uri>https://github.com/dotnet/runtime</Uri>
<Sha>2a87ffeaedb6b534d6eaa000d5ba9b545f4aac1e</Sha>
<Sha>6f5de0b2b979a70e6fe36904d0d4f087c32f9c7e</Sha>
</Dependency>
<Dependency Name="System.Text.Encoding.CodePages" Version="7.0.0-alpha.1.21551.1">
<Dependency Name="System.Text.Encoding.CodePages" Version="7.0.0-alpha.1.21561.1">
<Uri>https://github.com/dotnet/runtime</Uri>
<Sha>2a87ffeaedb6b534d6eaa000d5ba9b545f4aac1e</Sha>
<Sha>6f5de0b2b979a70e6fe36904d0d4f087c32f9c7e</Sha>
</Dependency>
<Dependency Name="System.Resources.Extensions" Version="7.0.0-alpha.1.21551.1">
<Dependency Name="System.Resources.Extensions" Version="7.0.0-alpha.1.21561.1">
<Uri>https://github.com/dotnet/runtime</Uri>
<Sha>2a87ffeaedb6b534d6eaa000d5ba9b545f4aac1e</Sha>
<Sha>6f5de0b2b979a70e6fe36904d0d4f087c32f9c7e</Sha>
</Dependency>
<Dependency Name="Microsoft.WindowsDesktop.App.Runtime.win-x64" Version="7.0.0-alpha.1.21560.2">
<Uri>https://github.com/dotnet/windowsdesktop</Uri>
Expand Down Expand Up @@ -283,9 +283,9 @@
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>fecf65bedcee9036b8ba9d8d7feef5413f294914</Sha>
</Dependency>
<Dependency Name="System.Reflection.MetadataLoadContext" Version="7.0.0-alpha.1.21551.1">
<Dependency Name="System.Reflection.MetadataLoadContext" Version="7.0.0-alpha.1.21561.1">
<Uri>https://github.com/dotnet/runtime</Uri>
<Sha>2a87ffeaedb6b534d6eaa000d5ba9b545f4aac1e</Sha>
<Sha>6f5de0b2b979a70e6fe36904d0d4f087c32f9c7e</Sha>
</Dependency>
<Dependency Name="Microsoft.DotNet.XliffTasks" Version="1.0.0-beta.21518.1" CoherentParentDependency="Microsoft.DotNet.Arcade.Sdk">
<Uri>https://github.com/dotnet/xliff-tasks</Uri>
Expand Down
22 changes: 11 additions & 11 deletions eng/Versions.props
Original file line number Diff line number Diff line change
Expand Up @@ -30,25 +30,25 @@
<SystemReflectionMetadataVersion>5.0.0</SystemReflectionMetadataVersion>
<MicrosoftDotNetSignToolVersion>7.0.0-beta.21559.3</MicrosoftDotNetSignToolVersion>
<MicrosoftWebXdtPackageVersion>3.1.0</MicrosoftWebXdtPackageVersion>
<SystemSecurityCryptographyProtectedDataPackageVersion>7.0.0-alpha.1.21551.1</SystemSecurityCryptographyProtectedDataPackageVersion>
<SystemSecurityCryptographyProtectedDataPackageVersion>7.0.0-alpha.1.21561.1</SystemSecurityCryptographyProtectedDataPackageVersion>
<SystemCollectionsSpecializedPackageVersion>4.3.0</SystemCollectionsSpecializedPackageVersion>
<SystemXmlXmlDocumentPackageVersion>4.3.0</SystemXmlXmlDocumentPackageVersion>
<WebDeploymentPackageVersion>4.0.5</WebDeploymentPackageVersion>
<SystemTextJsonVersion>5.0.2</SystemTextJsonVersion>
<SystemReflectionMetadataLoadContextVersion>7.0.0-alpha.1.21551.1</SystemReflectionMetadataLoadContextVersion>
<SystemReflectionMetadataLoadContextVersion>7.0.0-alpha.1.21561.1</SystemReflectionMetadataLoadContextVersion>
<DeploymentReleasesVersion>1.0.0-preview1.1.21112.1</DeploymentReleasesVersion>
<SystemManagementPackageVersion>4.6.0</SystemManagementPackageVersion>
<SystemCommandLineVersion>2.0.0-beta1.21525.1</SystemCommandLineVersion>
</PropertyGroup>
<PropertyGroup>
<!-- Dependencies from https://github.com/dotnet/runtime -->
<MicrosoftNETCoreAppRefPackageVersion>7.0.0-alpha.1.21551.1</MicrosoftNETCoreAppRefPackageVersion>
<VSRedistCommonNetCoreSharedFrameworkx6470PackageVersion>7.0.0-alpha.1.21551.1</VSRedistCommonNetCoreSharedFrameworkx6470PackageVersion>
<MicrosoftNETCoreAppRuntimewinx64PackageVersion>7.0.0-alpha.1.21551.1</MicrosoftNETCoreAppRuntimewinx64PackageVersion>
<MicrosoftNETCoreAppRefPackageVersion>7.0.0-alpha.1.21561.1</MicrosoftNETCoreAppRefPackageVersion>
<VSRedistCommonNetCoreSharedFrameworkx6470PackageVersion>7.0.0-alpha.1.21561.1</VSRedistCommonNetCoreSharedFrameworkx6470PackageVersion>
<MicrosoftNETCoreAppRuntimewinx64PackageVersion>7.0.0-alpha.1.21561.1</MicrosoftNETCoreAppRuntimewinx64PackageVersion>
<MicrosoftNETCoreAppRuntimePackageVersion>$(MicrosoftNETCoreAppRuntimewinx64PackageVersion)</MicrosoftNETCoreAppRuntimePackageVersion>
<MicrosoftExtensionsDependencyModelPackageVersion>7.0.0-alpha.1.21551.1</MicrosoftExtensionsDependencyModelPackageVersion>
<MicrosoftNETCoreDotNetHostResolverPackageVersion>7.0.0-alpha.1.21551.1</MicrosoftNETCoreDotNetHostResolverPackageVersion>
<MicrosoftNETHostModelVersion>7.0.0-alpha.1.21551.1</MicrosoftNETHostModelVersion>
<MicrosoftExtensionsDependencyModelPackageVersion>7.0.0-alpha.1.21561.1</MicrosoftExtensionsDependencyModelPackageVersion>
<MicrosoftNETCoreDotNetHostResolverPackageVersion>7.0.0-alpha.1.21561.1</MicrosoftNETCoreDotNetHostResolverPackageVersion>
<MicrosoftNETHostModelVersion>7.0.0-alpha.1.21561.1</MicrosoftNETHostModelVersion>
<MicrosoftExtensionsFileSystemGlobbingPackageVersion>6.0.0-preview.7.21363.9</MicrosoftExtensionsFileSystemGlobbingPackageVersion>
<MicrosoftExtensionsDependencyModelVersion>$(MicrosoftExtensionsDependencyModelPackageVersion)</MicrosoftExtensionsDependencyModelVersion>
</PropertyGroup>
Expand Down Expand Up @@ -82,10 +82,10 @@
</PropertyGroup>
<PropertyGroup>
<!-- Dependencies from https://github.com/dotnet/runtime -->
<SystemCodeDomPackageVersion>7.0.0-alpha.1.21551.1</SystemCodeDomPackageVersion>
<SystemTextEncodingCodePagesPackageVersion>7.0.0-alpha.1.21551.1</SystemTextEncodingCodePagesPackageVersion>
<SystemCodeDomPackageVersion>7.0.0-alpha.1.21561.1</SystemCodeDomPackageVersion>
<SystemTextEncodingCodePagesPackageVersion>7.0.0-alpha.1.21561.1</SystemTextEncodingCodePagesPackageVersion>
<SystemSecurityCryptographyProtectedDataPackageVersion>5.0.0-preview.7.20364.11</SystemSecurityCryptographyProtectedDataPackageVersion>
<SystemResourcesExtensionsPackageVersion>7.0.0-alpha.1.21551.1</SystemResourcesExtensionsPackageVersion>
<SystemResourcesExtensionsPackageVersion>7.0.0-alpha.1.21561.1</SystemResourcesExtensionsPackageVersion>
</PropertyGroup>
<PropertyGroup>
<!-- Dependencies from https://github.com/dotnet/format -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,29 +52,35 @@ public void It_resolves_analyzers_correctly(string language, string testAssetNam
"Analyzer",
GetValuesCommand.ValueType.Item);

command.Execute().Should().Pass();
command
.WithWorkingDirectory(asset.Path)
.Execute("/bl")
.Should().Pass();

var analyzers = command.GetValues();

switch (language)
{
case "C#":
analyzers.Select(x => RelativeNuGetPath(x)).Where(x => x != null).Should().BeEquivalentTo(
"Microsoft.NET.Sdk/targets/../analyzers/Microsoft.CodeAnalysis.CSharp.NetAnalyzers.dll",
"Microsoft.NET.Sdk/targets/../analyzers/Microsoft.CodeAnalysis.NetAnalyzers.dll",
"microsoft.codequality.analyzers/2.6.0/analyzers/dotnet/cs/Microsoft.CodeQuality.Analyzers.dll",
"microsoft.codequality.analyzers/2.6.0/analyzers/dotnet/cs/Microsoft.CodeQuality.CSharp.Analyzers.dll",
"microsoft.dependencyvalidation.analyzers/0.9.0/analyzers/dotnet/Microsoft.DependencyValidation.Analyzers.dll"
analyzers.Select(x => GetPackageAndPath(x)).Should().BeEquivalentTo(
("Microsoft.NET.Sdk", (string) null, "analyzers/Microsoft.CodeAnalysis.CSharp.NetAnalyzers.dll"),
("Microsoft.NET.Sdk", (string)null, "analyzers/Microsoft.CodeAnalysis.NetAnalyzers.dll"),
("microsoft.netcore.app.ref", (string)null, "analyzers/dotnet/cs/System.Text.Json.SourceGeneration.dll"),
("microsoft.netcore.app.ref", (string)null, "analyzers/dotnet/cs/System.Text.RegularExpressions.Generator.dll"),
("microsoft.codequality.analyzers", "2.6.0", "analyzers/dotnet/cs/Microsoft.CodeQuality.Analyzers.dll"),
("microsoft.codequality.analyzers", "2.6.0", "analyzers/dotnet/cs/Microsoft.CodeQuality.CSharp.Analyzers.dll"),
("microsoft.dependencyvalidation.analyzers", "0.9.0", "analyzers/dotnet/Microsoft.DependencyValidation.Analyzers.dll")

);
break;

case "VB":
analyzers.Select(x => RelativeNuGetPath(x)).Should().BeEquivalentTo(
"Microsoft.NET.Sdk/targets/../analyzers/Microsoft.CodeAnalysis.VisualBasic.NetAnalyzers.dll",
"Microsoft.NET.Sdk/targets/../analyzers/Microsoft.CodeAnalysis.NetAnalyzers.dll",
"microsoft.codequality.analyzers/2.6.0/analyzers/dotnet/vb/Microsoft.CodeQuality.Analyzers.dll",
"microsoft.codequality.analyzers/2.6.0/analyzers/dotnet/vb/Microsoft.CodeQuality.VisualBasic.Analyzers.dll",
"microsoft.dependencyvalidation.analyzers/0.9.0/analyzers/dotnet/Microsoft.DependencyValidation.Analyzers.dll"
analyzers.Select(x => GetPackageAndPath(x)).Should().BeEquivalentTo(
("Microsoft.NET.Sdk", (string)null, "analyzers/Microsoft.CodeAnalysis.VisualBasic.NetAnalyzers.dll"),
("Microsoft.NET.Sdk", (string)null, "analyzers/Microsoft.CodeAnalysis.NetAnalyzers.dll"),
("microsoft.codequality.analyzers", "2.6.0", "analyzers/dotnet/vb/Microsoft.CodeQuality.Analyzers.dll"),
("microsoft.codequality.analyzers", "2.6.0", "analyzers/dotnet/vb/Microsoft.CodeQuality.VisualBasic.Analyzers.dll"),
("microsoft.dependencyvalidation.analyzers", "0.9.0", "analyzers/dotnet/Microsoft.DependencyValidation.Analyzers.dll")
);
break;

Expand Down Expand Up @@ -113,7 +119,7 @@ public void It_resolves_multitargeted_analyzers()

var testAsset = _testAssetsManager.CreateTestProject(testProject);

List<string> GetAnalyzersForTargetFramework(string targetFramework)
List<(string package, string version, string path)> GetAnalyzersForTargetFramework(string targetFramework)
{
var getValuesCommand = new GetValuesCommand(testAsset,
valueName: "Analyzer",
Expand All @@ -124,35 +130,54 @@ List<string> GetAnalyzersForTargetFramework(string targetFramework)

getValuesCommand.Execute("-p:TargetFramework=" + targetFramework).Should().Pass();

return getValuesCommand.GetValues().Select(x => RelativeNuGetPath(x,false)).ToList();
return getValuesCommand.GetValues().Select(x => GetPackageAndPath(x)).ToList();
}

GetAnalyzersForTargetFramework("net6.0").Should().BeEquivalentTo("system.text.json/6.0.0-preview.4.21253.7/analyzers/dotnet/cs/System.Text.Json.SourceGeneration.dll");
GetAnalyzersForTargetFramework("net6.0").Should().BeEquivalentTo(("system.text.json", "6.0.0-preview.4.21253.7", "analyzers/dotnet/cs/System.Text.Json.SourceGeneration.dll"));
GetAnalyzersForTargetFramework("net472").Should().BeEmpty();
}

static readonly List<string> nugetRoots = new List<string>()
{
TestContext.Current.NuGetCachePath,
Path.Combine(FileConstants.UserProfileFolder, ".dotnet", "NuGetFallbackFolder"),
TestContext.Current.ToolsetUnderTest.SdksPath
Path.Combine(TestContext.Current.ToolsetUnderTest.DotNetRoot, "packs")
};

static string RelativeNuGetPath(string absoluteNuGetPath, bool excludeSourceGeneration = true)
static (string package, string version, string path) GetPackageAndPath(string absolutePath)
{
absolutePath = Path.GetFullPath(absolutePath);

if (absolutePath.StartsWith(TestContext.Current.ToolsetUnderTest.SdksPath))
{
string path = absolutePath.Substring(TestContext.Current.ToolsetUnderTest.SdksPath.Length + 1)
.Replace(Path.DirectorySeparatorChar, '/');
var components = path.Split(new char[] { '/' }, 2);
string sdkName = components[0];
string pathInSdk = components[1];
return (sdkName, null, pathInSdk);
}

foreach (var nugetRoot in nugetRoots)
{
if (excludeSourceGeneration && absoluteNuGetPath.EndsWith("System.Text.Json.SourceGeneration.dll"))
{
return null;
}
if (absoluteNuGetPath.StartsWith(nugetRoot + Path.DirectorySeparatorChar))
if (absolutePath.StartsWith(nugetRoot + Path.DirectorySeparatorChar))
{
return absoluteNuGetPath.Substring(nugetRoot.Length + 1)
.Replace(Path.DirectorySeparatorChar, '/');
string path = absolutePath.Substring(nugetRoot.Length + 1)
.Replace(Path.DirectorySeparatorChar, '/');
var components = path.Split(new char[] { '/' }, 3);
var packageName = components[0];
var packageVersion = components[1];
var pathInPackage = components[2];
// Don't check package version for analyzers included in targeting pack, as the version changes during development
if (packageName.Equals("microsoft.netcore.app.ref", StringComparison.Ordinal))
{
packageVersion = null;
}
return (packageName, packageVersion, pathInPackage);
}
}
throw new InvalidDataException("Expected path to be under a NuGet root: " + absoluteNuGetPath);

throw new InvalidDataException("Expected path to be under a known root: " + absolutePath);
}
}
}
Loading

0 comments on commit de390be

Please sign in to comment.