Skip to content

[main] Update dependencies from dotnet/runtime #22433

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

Merged
merged 12 commits into from
Nov 11, 2021
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
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>22546e346594fd2228945bb2051f68fa6e28414c</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-21551-01">
<Uri>https://github.com/dotnet/msbuild</Uri>
Expand Down Expand Up @@ -133,21 +133,21 @@
<Uri>https://github.com/dotnet/linker</Uri>
<Sha>0881e462ab279239e023b58bf1d10611ee2183b3</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.21530.1">
<Uri>https://github.com/dotnet/windowsdesktop</Uri>
Expand Down Expand Up @@ -283,9 +283,9 @@
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>0558f85d950fee2838bf02b9ba1f20d67f00b504</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.21529.1</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