Merge pull request #4010 from dotnet-maestro-bot/merge/main-to-main-vs-deps

[automated] Merge branch 'main' => 'main-vs-deps'
This commit is contained in:
msftbot[bot] 2021-08-03 10:39:13 +00:00 коммит произвёл GitHub
Родитель 0084f09b46 d59cb7c818
Коммит ddecbfd9ea
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
9 изменённых файлов: 116 добавлений и 65 удалений

Просмотреть файл

@ -1,88 +1,88 @@
<?xml version="1.0" encoding="utf-8"?>
<Dependencies>
<ProductDependencies>
<Dependency Name="Microsoft.CodeAnalysis.Razor" Version="6.0.0-rc.1.21370.5">
<Dependency Name="Microsoft.CodeAnalysis.Razor" Version="6.0.0-rc.1.21402.1">
<Uri>https://github.com/dotnet/aspnetcore</Uri>
<Sha>775899aefeb46d203fdbbadf42f58501a98ceec5</Sha>
<Sha>5f8690db5230e530ab32866a7dc9375ee64675ce</Sha>
</Dependency>
<Dependency Name="Microsoft.AspNetCore.Razor.Internal.Transport" Version="6.0.0-rc.1.21370.5">
<Dependency Name="Microsoft.AspNetCore.Razor.Internal.Transport" Version="6.0.0-rc.1.21402.1">
<Uri>https://github.com/dotnet/aspnetcore</Uri>
<Sha>775899aefeb46d203fdbbadf42f58501a98ceec5</Sha>
<Sha>5f8690db5230e530ab32866a7dc9375ee64675ce</Sha>
</Dependency>
<Dependency Name="Microsoft.AspNetCore.Razor.Language" Version="6.0.0-rc.1.21370.5">
<Dependency Name="Microsoft.AspNetCore.Razor.Language" Version="6.0.0-rc.1.21402.1">
<Uri>https://github.com/dotnet/aspnetcore</Uri>
<Sha>775899aefeb46d203fdbbadf42f58501a98ceec5</Sha>
<Sha>5f8690db5230e530ab32866a7dc9375ee64675ce</Sha>
</Dependency>
<Dependency Name="Microsoft.AspNetCore.Testing" Version="6.0.0-rc.1.21370.5">
<Dependency Name="Microsoft.AspNetCore.Testing" Version="6.0.0-rc.1.21402.1">
<Uri>https://github.com/dotnet/aspnetcore</Uri>
<Sha>775899aefeb46d203fdbbadf42f58501a98ceec5</Sha>
<Sha>5f8690db5230e530ab32866a7dc9375ee64675ce</Sha>
</Dependency>
<Dependency Name="Microsoft.AspNetCore.Mvc.Razor.Extensions" Version="6.0.0-rc.1.21370.5">
<Dependency Name="Microsoft.AspNetCore.Mvc.Razor.Extensions" Version="6.0.0-rc.1.21402.1">
<Uri>https://github.com/dotnet/aspnetcore</Uri>
<Sha>775899aefeb46d203fdbbadf42f58501a98ceec5</Sha>
<Sha>5f8690db5230e530ab32866a7dc9375ee64675ce</Sha>
</Dependency>
<Dependency Name="Microsoft.AspNetCore.Mvc.Razor.Extensions.Version1_X" Version="6.0.0-rc.1.21370.5">
<Dependency Name="Microsoft.AspNetCore.Mvc.Razor.Extensions.Version1_X" Version="6.0.0-rc.1.21402.1">
<Uri>https://github.com/dotnet/aspnetcore</Uri>
<Sha>775899aefeb46d203fdbbadf42f58501a98ceec5</Sha>
<Sha>5f8690db5230e530ab32866a7dc9375ee64675ce</Sha>
</Dependency>
<Dependency Name="Microsoft.AspNetCore.Mvc.Razor.Extensions.Version2_X" Version="6.0.0-rc.1.21370.5">
<Dependency Name="Microsoft.AspNetCore.Mvc.Razor.Extensions.Version2_X" Version="6.0.0-rc.1.21402.1">
<Uri>https://github.com/dotnet/aspnetcore</Uri>
<Sha>775899aefeb46d203fdbbadf42f58501a98ceec5</Sha>
<Sha>5f8690db5230e530ab32866a7dc9375ee64675ce</Sha>
</Dependency>
<Dependency Name="Microsoft.Extensions.Configuration.Json" Version="6.0.0-rc.1.21368.1" CoherentParentDependency="Microsoft.CodeAnalysis.Razor">
<Dependency Name="Microsoft.Extensions.Configuration.Json" Version="6.0.0-rc.1.21380.1" CoherentParentDependency="Microsoft.CodeAnalysis.Razor">
<Uri>https://github.com/dotnet/runtime</Uri>
<Sha>96ce6b35359b3c159ef3e685dd67cf30bb46769b</Sha>
<Sha>cb64fe6669826b9e1e17bb66c84c13ba76bdec8e</Sha>
</Dependency>
<Dependency Name="Microsoft.Extensions.Logging" Version="6.0.0-rc.1.21368.1" CoherentParentDependency="Microsoft.CodeAnalysis.Razor">
<Dependency Name="Microsoft.Extensions.Logging" Version="6.0.0-rc.1.21380.1" CoherentParentDependency="Microsoft.CodeAnalysis.Razor">
<Uri>https://github.com/dotnet/runtime</Uri>
<Sha>96ce6b35359b3c159ef3e685dd67cf30bb46769b</Sha>
<Sha>cb64fe6669826b9e1e17bb66c84c13ba76bdec8e</Sha>
</Dependency>
<Dependency Name="Microsoft.NET.Sdk.Razor" Version="6.0.0-alpha.1.21072.5">
<Uri>https://github.com/dotnet/aspnetcore</Uri>
<Sha>20b6779cf3af2fed6a8fe64a0865cfab50b776bb</Sha>
</Dependency>
<Dependency Name="System.Diagnostics.DiagnosticSource" Version="6.0.0-rc.1.21368.1" CoherentParentDependency="Microsoft.CodeAnalysis.Razor">
<Dependency Name="System.Diagnostics.DiagnosticSource" Version="6.0.0-rc.1.21380.1" CoherentParentDependency="Microsoft.CodeAnalysis.Razor">
<Uri>https://github.com/dotnet/runtime</Uri>
<Sha>96ce6b35359b3c159ef3e685dd67cf30bb46769b</Sha>
<Sha>cb64fe6669826b9e1e17bb66c84c13ba76bdec8e</Sha>
</Dependency>
<Dependency Name="System.Resources.Extensions" Version="6.0.0-rc.1.21368.1" CoherentParentDependency="Microsoft.CodeAnalysis.Razor">
<Dependency Name="System.Resources.Extensions" Version="6.0.0-rc.1.21380.1" CoherentParentDependency="Microsoft.CodeAnalysis.Razor">
<Uri>https://github.com/dotnet/runtime</Uri>
<Sha>96ce6b35359b3c159ef3e685dd67cf30bb46769b</Sha>
<Sha>cb64fe6669826b9e1e17bb66c84c13ba76bdec8e</Sha>
</Dependency>
<Dependency Name="System.Text.Encodings.Web" Version="6.0.0-rc.1.21368.1" CoherentParentDependency="Microsoft.CodeAnalysis.Razor">
<Dependency Name="System.Text.Encodings.Web" Version="6.0.0-rc.1.21380.1" CoherentParentDependency="Microsoft.CodeAnalysis.Razor">
<Uri>https://github.com/dotnet/runtime</Uri>
<Sha>96ce6b35359b3c159ef3e685dd67cf30bb46769b</Sha>
<Sha>cb64fe6669826b9e1e17bb66c84c13ba76bdec8e</Sha>
</Dependency>
<Dependency Name="Microsoft.Extensions.DependencyModel" Version="6.0.0-rc.1.21368.1" CoherentParentDependency="Microsoft.CodeAnalysis.Razor">
<Dependency Name="Microsoft.Extensions.DependencyModel" Version="6.0.0-rc.1.21380.1" CoherentParentDependency="Microsoft.CodeAnalysis.Razor">
<Uri>https://github.com/dotnet/runtime</Uri>
<Sha>96ce6b35359b3c159ef3e685dd67cf30bb46769b</Sha>
<Sha>cb64fe6669826b9e1e17bb66c84c13ba76bdec8e</Sha>
</Dependency>
<Dependency Name="Microsoft.NETCore.App.Ref" Version="6.0.0-rc.1.21368.1" CoherentParentDependency="Microsoft.CodeAnalysis.Razor">
<Dependency Name="Microsoft.NETCore.App.Ref" Version="6.0.0-rc.1.21380.1" CoherentParentDependency="Microsoft.CodeAnalysis.Razor">
<Uri>https://github.com/dotnet/runtime</Uri>
<Sha>96ce6b35359b3c159ef3e685dd67cf30bb46769b</Sha>
<Sha>cb64fe6669826b9e1e17bb66c84c13ba76bdec8e</Sha>
</Dependency>
<Dependency Name="Microsoft.NETCore.BrowserDebugHost.Transport" Version="6.0.0-rc.1.21368.1" CoherentParentDependency="Microsoft.CodeAnalysis.Razor">
<Dependency Name="Microsoft.NETCore.BrowserDebugHost.Transport" Version="6.0.0-rc.1.21380.1" CoherentParentDependency="Microsoft.CodeAnalysis.Razor">
<Uri>https://github.com/dotnet/runtime</Uri>
<Sha>96ce6b35359b3c159ef3e685dd67cf30bb46769b</Sha>
<Sha>cb64fe6669826b9e1e17bb66c84c13ba76bdec8e</Sha>
</Dependency>
<!--
Win-x64 is used here because we have picked an arbitrary runtime identifier to flow the version of the latest NETCore.App runtime.
All Runtime.$rid packages should have the same version.
-->
<Dependency Name="Microsoft.NETCore.App.Runtime.win-x64" Version="6.0.0-rc.1.21368.1" CoherentParentDependency="Microsoft.CodeAnalysis.Razor">
<Dependency Name="Microsoft.NETCore.App.Runtime.win-x64" Version="6.0.0-rc.1.21380.1" CoherentParentDependency="Microsoft.CodeAnalysis.Razor">
<Uri>https://github.com/dotnet/runtime</Uri>
<Sha>96ce6b35359b3c159ef3e685dd67cf30bb46769b</Sha>
<Sha>cb64fe6669826b9e1e17bb66c84c13ba76bdec8e</Sha>
</Dependency>
</ProductDependencies>
<ToolsetDependencies>
<!-- Listed as a dependency to workaround https://github.com/dotnet/cli/issues/10528 -->
<Dependency Name="Microsoft.NETCore.Platforms" Version="6.0.0-rc.1.21368.1" CoherentParentDependency="Microsoft.CodeAnalysis.Razor">
<Dependency Name="Microsoft.NETCore.Platforms" Version="6.0.0-rc.1.21380.1" CoherentParentDependency="Microsoft.CodeAnalysis.Razor">
<Uri>https://github.com/dotnet/runtime</Uri>
<Sha>96ce6b35359b3c159ef3e685dd67cf30bb46769b</Sha>
<Sha>cb64fe6669826b9e1e17bb66c84c13ba76bdec8e</Sha>
</Dependency>
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="6.0.0-beta.21366.1">
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="6.0.0-beta.21379.2">
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>b03966cd85285e425ffe56003c0ab57e103dd14e</Sha>
<Sha>62a8aafffd4c68ef887680f6837abdff906a662c</Sha>
</Dependency>
</ToolsetDependencies>
</Dependencies>

Просмотреть файл

@ -49,24 +49,24 @@
-->
<PropertyGroup Label="Automated">
<MicrosoftCodeAnalysisRazorPackageVersion>6.0.0-rc.1.21370.5</MicrosoftCodeAnalysisRazorPackageVersion>
<MicrosoftAspNetCoreRazorInternalTransportPackageVersion>6.0.0-rc.1.21370.5</MicrosoftAspNetCoreRazorInternalTransportPackageVersion>
<MicrosoftAspNetCoreRazorLanguagePackageVersion>6.0.0-rc.1.21370.5</MicrosoftAspNetCoreRazorLanguagePackageVersion>
<MicrosoftAspNetCoreTestingPackageVersion>6.0.0-rc.1.21370.5</MicrosoftAspNetCoreTestingPackageVersion>
<MicrosoftAspNetCoreMvcRazorExtensionsPackageVersion>6.0.0-rc.1.21370.5</MicrosoftAspNetCoreMvcRazorExtensionsPackageVersion>
<MicrosoftAspNetCoreMvcRazorExtensionsVersion1_XPackageVersion>6.0.0-rc.1.21370.5</MicrosoftAspNetCoreMvcRazorExtensionsVersion1_XPackageVersion>
<MicrosoftAspNetCoreMvcRazorExtensionsVersion2_XPackageVersion>6.0.0-rc.1.21370.5</MicrosoftAspNetCoreMvcRazorExtensionsVersion2_XPackageVersion>
<MicrosoftExtensionsConfigurationJsonPackageVersion>6.0.0-rc.1.21368.1</MicrosoftExtensionsConfigurationJsonPackageVersion>
<MicrosoftExtensionsDependencyModelPackageVersion>6.0.0-rc.1.21368.1</MicrosoftExtensionsDependencyModelPackageVersion>
<MicrosoftExtensionsLoggingPackageVersion>6.0.0-rc.1.21368.1</MicrosoftExtensionsLoggingPackageVersion>
<MicrosoftNETCoreBrowserDebugHostTransportPackageVersion>6.0.0-rc.1.21368.1</MicrosoftNETCoreBrowserDebugHostTransportPackageVersion>
<MicrosoftNETCoreAppRefPackageVersion>6.0.0-rc.1.21368.1</MicrosoftNETCoreAppRefPackageVersion>
<MicrosoftNETCoreAppRuntimewinx64PackageVersion>6.0.0-rc.1.21368.1</MicrosoftNETCoreAppRuntimewinx64PackageVersion>
<MicrosoftNETCorePlatformsPackageVersion>6.0.0-rc.1.21368.1</MicrosoftNETCorePlatformsPackageVersion>
<MicrosoftCodeAnalysisRazorPackageVersion>6.0.0-rc.1.21402.1</MicrosoftCodeAnalysisRazorPackageVersion>
<MicrosoftAspNetCoreRazorInternalTransportPackageVersion>6.0.0-rc.1.21402.1</MicrosoftAspNetCoreRazorInternalTransportPackageVersion>
<MicrosoftAspNetCoreRazorLanguagePackageVersion>6.0.0-rc.1.21402.1</MicrosoftAspNetCoreRazorLanguagePackageVersion>
<MicrosoftAspNetCoreTestingPackageVersion>6.0.0-rc.1.21402.1</MicrosoftAspNetCoreTestingPackageVersion>
<MicrosoftAspNetCoreMvcRazorExtensionsPackageVersion>6.0.0-rc.1.21402.1</MicrosoftAspNetCoreMvcRazorExtensionsPackageVersion>
<MicrosoftAspNetCoreMvcRazorExtensionsVersion1_XPackageVersion>6.0.0-rc.1.21402.1</MicrosoftAspNetCoreMvcRazorExtensionsVersion1_XPackageVersion>
<MicrosoftAspNetCoreMvcRazorExtensionsVersion2_XPackageVersion>6.0.0-rc.1.21402.1</MicrosoftAspNetCoreMvcRazorExtensionsVersion2_XPackageVersion>
<MicrosoftExtensionsConfigurationJsonPackageVersion>6.0.0-rc.1.21380.1</MicrosoftExtensionsConfigurationJsonPackageVersion>
<MicrosoftExtensionsDependencyModelPackageVersion>6.0.0-rc.1.21380.1</MicrosoftExtensionsDependencyModelPackageVersion>
<MicrosoftExtensionsLoggingPackageVersion>6.0.0-rc.1.21380.1</MicrosoftExtensionsLoggingPackageVersion>
<MicrosoftNETCoreBrowserDebugHostTransportPackageVersion>6.0.0-rc.1.21380.1</MicrosoftNETCoreBrowserDebugHostTransportPackageVersion>
<MicrosoftNETCoreAppRefPackageVersion>6.0.0-rc.1.21380.1</MicrosoftNETCoreAppRefPackageVersion>
<MicrosoftNETCoreAppRuntimewinx64PackageVersion>6.0.0-rc.1.21380.1</MicrosoftNETCoreAppRuntimewinx64PackageVersion>
<MicrosoftNETCorePlatformsPackageVersion>6.0.0-rc.1.21380.1</MicrosoftNETCorePlatformsPackageVersion>
<MicrosoftNETSdkRazorPackageVersion>6.0.0-alpha.1.21072.5</MicrosoftNETSdkRazorPackageVersion>
<SystemDiagnosticsDiagnosticSourcePackageVersion>6.0.0-rc.1.21368.1</SystemDiagnosticsDiagnosticSourcePackageVersion>
<SystemResourcesExtensionsPackageVersion>6.0.0-rc.1.21368.1</SystemResourcesExtensionsPackageVersion>
<SystemTextEncodingsWebPackageVersion>6.0.0-rc.1.21368.1</SystemTextEncodingsWebPackageVersion>
<SystemDiagnosticsDiagnosticSourcePackageVersion>6.0.0-rc.1.21380.1</SystemDiagnosticsDiagnosticSourcePackageVersion>
<SystemResourcesExtensionsPackageVersion>6.0.0-rc.1.21380.1</SystemResourcesExtensionsPackageVersion>
<SystemTextEncodingsWebPackageVersion>6.0.0-rc.1.21380.1</SystemTextEncodingsWebPackageVersion>
</PropertyGroup>
<PropertyGroup Label="Dependency version settings">
<!--

Просмотреть файл

@ -1,5 +1,5 @@
<!-- Licensed to the .NET Foundation under one or more agreements. The .NET Foundation licenses this file to you under the MIT license. -->
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. -->
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net472</TargetFramework>

Просмотреть файл

@ -29,6 +29,11 @@ steps:
officialBuildArgs='/p:DotNetPublishUsingPipelines=true /p:OfficialBuildId=$(BUILD.BUILDNUMBER)'
fi
internalRuntimeDownloadArgs=
if [ '$(dotnetclimsrc-read-sas-token-base64)' != '$''(dotnetclimsrc-read-sas-token-base64)' ]; then
internalRuntimeDownloadArgs='--runtimesourcefeed https://dotnetclimsrc.blob.core.windows.net/dotnet --runtimesourcefeedkey $(dotnetclimsrc-read-sas-token-base64)'
fi
targetRidArgs=
if [ '${{ parameters.platform.targetRID }}' != '' ]; then
targetRidArgs='/p:TargetRid=${{ parameters.platform.targetRID }}'
@ -43,6 +48,7 @@ steps:
--configuration $buildConfig \
--restore --build --pack $publishArgs -bl \
$officialBuildArgs \
$internalRuntimeDownloadArgs \
$targetRidArgs \
/p:SourceBuildNonPortable=${{ parameters.platform.nonPortable }} \
/p:ArcadeBuildFromSource=true

Просмотреть файл

@ -1,6 +1,6 @@
{
"tools": {
"dotnet": "6.0.100-preview.4.21255.9",
"dotnet": "6.0.100-preview.6.21355.2",
"runtimes": {
"dotnet": [
"2.1.11",
@ -15,10 +15,10 @@
}
},
"sdk": {
"version": "6.0.100-preview.4.21255.9"
"version": "6.0.100-preview.6.21355.2"
},
"msbuild-sdks": {
"Microsoft.DotNet.Arcade.Sdk": "6.0.0-beta.21366.1",
"Microsoft.DotNet.Arcade.Sdk": "6.0.0-beta.21379.2",
"Yarn.MSBuild": "1.22.10"
}
}

Просмотреть файл

@ -165,14 +165,14 @@ namespace Microsoft.AspNetCore.Razor.LanguageServer.Formatting
// @attribute [Obsolete("old")]
//
// The CSharpCodeBlockSyntax covers everything from the end of "attribute" to the end of the line
if (node is CSharpCodeBlockSyntax content &&
node.Parent?.Parent is RazorDirectiveSyntax directive &&
directive.DirectiveDescriptor?.Kind == DirectiveKind.SingleLine)
SyntaxList<SyntaxNode>? children;
if (IsSingleLineDirective(node, out children) ||
IsUsingDirective(node, out children))
{
// Shrink any block of C# that only has whitespace down to a single space.
// In the @attribute case above this would only be the whitespace between the directive and code
// but for @inject its also between the type and the field name.
foreach (var child in content.Children)
foreach (var child in children)
{
if (child.ContainsOnlyWhitespace(includingNewLines: false))
{
@ -180,6 +180,40 @@ namespace Microsoft.AspNetCore.Razor.LanguageServer.Formatting
}
}
}
static bool IsSingleLineDirective(SyntaxNode node, [NotNullWhen(true)] out SyntaxList<SyntaxNode>? children)
{
if (node is CSharpCodeBlockSyntax content &&
node.Parent?.Parent is RazorDirectiveSyntax directive &&
directive.DirectiveDescriptor?.Kind == DirectiveKind.SingleLine)
{
children = content.Children;
return true;
}
children = null;
return false;
}
static bool IsUsingDirective(SyntaxNode node, [NotNullWhen(true)] out SyntaxList<SyntaxNode>? children)
{
// Using directives are weird, because the directive keyword ("using") is part of the C# statement it represents
if (node is RazorDirectiveSyntax razorDirective &&
razorDirective.DirectiveDescriptor is null &&
razorDirective.Body is RazorDirectiveBodySyntax body &&
body.Keyword is CSharpStatementLiteralSyntax literal &&
literal.LiteralTokens.Count > 0)
{
if (literal.LiteralTokens[0] is { Kind: SyntaxKind.Keyword, Content: "using" })
{
children = literal.LiteralTokens;
return true;
}
}
children = null;
return false;
}
}
private static void FormatWhitespaceBetweenDirectiveAndBrace(SyntaxNode node, RazorDirectiveSyntax directive, List<TextEdit> edits, RazorSourceDocument source, FormattingContext context)

Просмотреть файл

@ -31,7 +31,7 @@ namespace Microsoft.CodeAnalysis.Razor.Completion
completionDisplayText,
RazorCompletionItemKind.MarkupTransition,
s_elementCommitCharacters);
var completionDescription = new MarkupTransitionCompletionDescription(Resources.MarkupTransition_Description);
var completionDescription = new MarkupTransitionCompletionDescription(CodeAnalysisResources.MarkupTransition_Description);
s_markupTransitionCompletionItem.SetMarkupTransitionCompletionDescription(completionDescription);
}

Просмотреть файл

@ -312,7 +312,7 @@ expected: @"@page ""MyPage""
input: @"
@using System;
",
expected: @"@using System;
expected: @"@using System;
");
}
@ -323,7 +323,18 @@ expected: @"@using System;
input: @"
@using static System.Math;
",
expected: @"@using static System.Math;
expected: @"@using static System.Math;
");
}
[Fact]
public async Task UsingAlias()
{
await RunFormattingTestAsync(
input: @"
@using M = System.Math;
",
expected: @"@using M = System.Math;
");
}

Просмотреть файл

@ -316,7 +316,7 @@ namespace Microsoft.CodeAnalysis.Razor.Completion
Assert.Equal(item.DisplayText, SyntaxConstants.TextTagName);
Assert.Equal(item.InsertText, SyntaxConstants.TextTagName);
var completionDescription = item.GetMarkupTransitionCompletionDescription();
Assert.Equal(Resources.MarkupTransition_Description, completionDescription.Description);
Assert.Equal(CodeAnalysisResources.MarkupTransition_Description, completionDescription.Description);
}
private static RazorSyntaxTree CreateSyntaxTree(string text, params DirectiveDescriptor[] directives)