Skip to content

Commit 7f7f932

Browse files
committed
Merge remote-tracking branch 'upstream/main' into CohostSpanMapping
2 parents cc73d66 + ce522dd commit 7f7f932

File tree

7 files changed

+173
-116
lines changed

7 files changed

+173
-116
lines changed

eng/Version.Details.props

Lines changed: 71 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,71 @@
1-
<!-- will get filled in the next backflow -->
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<!--
3+
This file is auto-generated by the Maestro dependency flow system.
4+
Do not edit it manually, as it will get overwritten by automation.
5+
This file should be imported by eng/Versions.props
6+
-->
7+
<Project>
8+
<PropertyGroup>
9+
<!-- dotnet/roslyn dependencies -->
10+
<MicrosoftCodeAnalysisAnalyzersPackageVersion>5.0.0-2.25380.11</MicrosoftCodeAnalysisAnalyzersPackageVersion>
11+
<MicrosoftCodeAnalysisCommonPackageVersion>5.0.0-2.25380.11</MicrosoftCodeAnalysisCommonPackageVersion>
12+
<MicrosoftCodeAnalysisCSharpPackageVersion>5.0.0-2.25380.11</MicrosoftCodeAnalysisCSharpPackageVersion>
13+
<MicrosoftCodeAnalysisCSharpEditorFeaturesPackageVersion>5.0.0-2.25380.11</MicrosoftCodeAnalysisCSharpEditorFeaturesPackageVersion>
14+
<MicrosoftCodeAnalysisCSharpFeaturesPackageVersion>5.0.0-2.25380.11</MicrosoftCodeAnalysisCSharpFeaturesPackageVersion>
15+
<MicrosoftCodeAnalysisCSharpWorkspacesPackageVersion>5.0.0-2.25380.11</MicrosoftCodeAnalysisCSharpWorkspacesPackageVersion>
16+
<MicrosoftCodeAnalysisEditorFeaturesPackageVersion>5.0.0-2.25380.11</MicrosoftCodeAnalysisEditorFeaturesPackageVersion>
17+
<MicrosoftCodeAnalysisEditorFeaturesCommonPackageVersion>5.0.0-2.25380.11</MicrosoftCodeAnalysisEditorFeaturesCommonPackageVersion>
18+
<MicrosoftCodeAnalysisEditorFeaturesTextPackageVersion>5.0.0-2.25380.11</MicrosoftCodeAnalysisEditorFeaturesTextPackageVersion>
19+
<MicrosoftCodeAnalysisExternalAccessFSharpPackageVersion>5.0.0-2.25380.11</MicrosoftCodeAnalysisExternalAccessFSharpPackageVersion>
20+
<MicrosoftCodeAnalysisExternalAccessRazorEditorFeaturesPackageVersion>5.0.0-2.25380.11</MicrosoftCodeAnalysisExternalAccessRazorEditorFeaturesPackageVersion>
21+
<MicrosoftCodeAnalysisExternalAccessRazorFeaturesPackageVersion>5.0.0-2.25380.11</MicrosoftCodeAnalysisExternalAccessRazorFeaturesPackageVersion>
22+
<MicrosoftCodeAnalysisLanguageServerProtocolPackageVersion>5.0.0-2.25380.11</MicrosoftCodeAnalysisLanguageServerProtocolPackageVersion>
23+
<MicrosoftCodeAnalysisRemoteServiceHubPackageVersion>5.0.0-2.25380.11</MicrosoftCodeAnalysisRemoteServiceHubPackageVersion>
24+
<MicrosoftCodeAnalysisTestUtilitiesPackageVersion>5.0.0-2.25380.11</MicrosoftCodeAnalysisTestUtilitiesPackageVersion>
25+
<MicrosoftCodeAnalysisVisualBasicWorkspacesPackageVersion>5.0.0-2.25380.11</MicrosoftCodeAnalysisVisualBasicWorkspacesPackageVersion>
26+
<MicrosoftCodeAnalysisWorkspacesCommonPackageVersion>5.0.0-2.25380.11</MicrosoftCodeAnalysisWorkspacesCommonPackageVersion>
27+
<MicrosoftCodeAnalysisWorkspacesMSBuildPackageVersion>5.0.0-2.25380.11</MicrosoftCodeAnalysisWorkspacesMSBuildPackageVersion>
28+
<MicrosoftCommonLanguageServerProtocolFrameworkPackageVersion>5.0.0-2.25380.11</MicrosoftCommonLanguageServerProtocolFrameworkPackageVersion>
29+
<MicrosoftNetCompilersToolsetPackageVersion>5.0.0-2.25380.11</MicrosoftNetCompilersToolsetPackageVersion>
30+
<MicrosoftVisualStudioLanguageServicesPackageVersion>5.0.0-2.25380.11</MicrosoftVisualStudioLanguageServicesPackageVersion>
31+
<!-- dotnet/arcade dependencies -->
32+
<MicrosoftDotNetArcadeSdkPackageVersion>9.0.0-beta.25255.5</MicrosoftDotNetArcadeSdkPackageVersion>
33+
<!-- dotnet/aspnetcore dependencies -->
34+
<MicrosoftExtensionsObjectPoolPackageVersion>8.0.0</MicrosoftExtensionsObjectPoolPackageVersion>
35+
<!-- dotnet/runtime dependencies -->
36+
<SystemCollectionsImmutablePackageVersion>9.0.0</SystemCollectionsImmutablePackageVersion>
37+
<SystemReflectionMetadataPackageVersion>9.0.0</SystemReflectionMetadataPackageVersion>
38+
</PropertyGroup>
39+
<!--Property group for alternate package version names-->
40+
<PropertyGroup>
41+
<!-- dotnet/roslyn dependencies -->
42+
<MicrosoftCodeAnalysisAnalyzersVersion>$(MicrosoftCodeAnalysisAnalyzersPackageVersion)</MicrosoftCodeAnalysisAnalyzersVersion>
43+
<MicrosoftCodeAnalysisCommonVersion>$(MicrosoftCodeAnalysisCommonPackageVersion)</MicrosoftCodeAnalysisCommonVersion>
44+
<MicrosoftCodeAnalysisCSharpVersion>$(MicrosoftCodeAnalysisCSharpPackageVersion)</MicrosoftCodeAnalysisCSharpVersion>
45+
<MicrosoftCodeAnalysisCSharpEditorFeaturesVersion>$(MicrosoftCodeAnalysisCSharpEditorFeaturesPackageVersion)</MicrosoftCodeAnalysisCSharpEditorFeaturesVersion>
46+
<MicrosoftCodeAnalysisCSharpFeaturesVersion>$(MicrosoftCodeAnalysisCSharpFeaturesPackageVersion)</MicrosoftCodeAnalysisCSharpFeaturesVersion>
47+
<MicrosoftCodeAnalysisCSharpWorkspacesVersion>$(MicrosoftCodeAnalysisCSharpWorkspacesPackageVersion)</MicrosoftCodeAnalysisCSharpWorkspacesVersion>
48+
<MicrosoftCodeAnalysisEditorFeaturesVersion>$(MicrosoftCodeAnalysisEditorFeaturesPackageVersion)</MicrosoftCodeAnalysisEditorFeaturesVersion>
49+
<MicrosoftCodeAnalysisEditorFeaturesCommonVersion>$(MicrosoftCodeAnalysisEditorFeaturesCommonPackageVersion)</MicrosoftCodeAnalysisEditorFeaturesCommonVersion>
50+
<MicrosoftCodeAnalysisEditorFeaturesTextVersion>$(MicrosoftCodeAnalysisEditorFeaturesTextPackageVersion)</MicrosoftCodeAnalysisEditorFeaturesTextVersion>
51+
<MicrosoftCodeAnalysisExternalAccessFSharpVersion>$(MicrosoftCodeAnalysisExternalAccessFSharpPackageVersion)</MicrosoftCodeAnalysisExternalAccessFSharpVersion>
52+
<MicrosoftCodeAnalysisExternalAccessRazorEditorFeaturesVersion>$(MicrosoftCodeAnalysisExternalAccessRazorEditorFeaturesPackageVersion)</MicrosoftCodeAnalysisExternalAccessRazorEditorFeaturesVersion>
53+
<MicrosoftCodeAnalysisExternalAccessRazorFeaturesVersion>$(MicrosoftCodeAnalysisExternalAccessRazorFeaturesPackageVersion)</MicrosoftCodeAnalysisExternalAccessRazorFeaturesVersion>
54+
<MicrosoftCodeAnalysisLanguageServerProtocolVersion>$(MicrosoftCodeAnalysisLanguageServerProtocolPackageVersion)</MicrosoftCodeAnalysisLanguageServerProtocolVersion>
55+
<MicrosoftCodeAnalysisRemoteServiceHubVersion>$(MicrosoftCodeAnalysisRemoteServiceHubPackageVersion)</MicrosoftCodeAnalysisRemoteServiceHubVersion>
56+
<MicrosoftCodeAnalysisTestUtilitiesVersion>$(MicrosoftCodeAnalysisTestUtilitiesPackageVersion)</MicrosoftCodeAnalysisTestUtilitiesVersion>
57+
<MicrosoftCodeAnalysisVisualBasicWorkspacesVersion>$(MicrosoftCodeAnalysisVisualBasicWorkspacesPackageVersion)</MicrosoftCodeAnalysisVisualBasicWorkspacesVersion>
58+
<MicrosoftCodeAnalysisWorkspacesCommonVersion>$(MicrosoftCodeAnalysisWorkspacesCommonPackageVersion)</MicrosoftCodeAnalysisWorkspacesCommonVersion>
59+
<MicrosoftCodeAnalysisWorkspacesMSBuildVersion>$(MicrosoftCodeAnalysisWorkspacesMSBuildPackageVersion)</MicrosoftCodeAnalysisWorkspacesMSBuildVersion>
60+
<MicrosoftCommonLanguageServerProtocolFrameworkVersion>$(MicrosoftCommonLanguageServerProtocolFrameworkPackageVersion)</MicrosoftCommonLanguageServerProtocolFrameworkVersion>
61+
<MicrosoftNetCompilersToolsetVersion>$(MicrosoftNetCompilersToolsetPackageVersion)</MicrosoftNetCompilersToolsetVersion>
62+
<MicrosoftVisualStudioLanguageServicesVersion>$(MicrosoftVisualStudioLanguageServicesPackageVersion)</MicrosoftVisualStudioLanguageServicesVersion>
63+
<!-- dotnet/arcade dependencies -->
64+
<MicrosoftDotNetArcadeSdkVersion>$(MicrosoftDotNetArcadeSdkPackageVersion)</MicrosoftDotNetArcadeSdkVersion>
65+
<!-- dotnet/aspnetcore dependencies -->
66+
<MicrosoftExtensionsObjectPoolVersion>$(MicrosoftExtensionsObjectPoolPackageVersion)</MicrosoftExtensionsObjectPoolVersion>
67+
<!-- dotnet/runtime dependencies -->
68+
<SystemCollectionsImmutableVersion>$(SystemCollectionsImmutablePackageVersion)</SystemCollectionsImmutableVersion>
69+
<SystemReflectionMetadataVersion>$(SystemReflectionMetadataPackageVersion)</SystemReflectionMetadataVersion>
70+
</PropertyGroup>
71+
</Project>

eng/Version.Details.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<Dependencies>
3-
<Source Uri="https://github.com/dotnet/dotnet" Mapping="razor" Sha="f5705c8f4c5079bba77bae8698ba1583bde0388c" BarId="269610" />
3+
<Source Uri="https://github.com/dotnet/dotnet" Mapping="razor" Sha="8b29a1682219da555ee27e4fdda55dc3884b316f" BarId="277635" />
44
<ProductDependencies>
55
<Dependency Name="Microsoft.Net.Compilers.Toolset" Version="5.0.0-2.25380.11">
66
<Uri>https://github.com/dotnet/roslyn</Uri>

eng/Versions.props

Lines changed: 2 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
1+
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
2+
<Import Project="Version.Details.props" Condition="Exists('Version.Details.props')" />
23
<!-- Opt-in arcade features -->
34
<PropertyGroup>
45
<UsingToolVSSDK>true</UsingToolVSSDK>
@@ -37,52 +38,6 @@
3738
<AddinVersion Condition="'$(OfficialBuildId)' == ''">$(AddinVersion).42424242.42</AddinVersion>
3839
</PropertyGroup>
3940
<!--
40-
41-
These versions should ONLY be updated by automation.
42-
43-
DO NOT UPDATE THESE MANUALLY. Use the `darc` command line tool to update this file so it stays in sync with
44-
Version.Details.xml.
45-
46-
See https://github.com/dotnet/arcade/blob/main/Documentation/Darc.md for instructions on using darc.
47-
48-
-->
49-
<PropertyGroup Label="Automated">
50-
<MicrosoftCodeAnalysisAnalyzersPackageVersion>5.0.0-2.25380.11</MicrosoftCodeAnalysisAnalyzersPackageVersion>
51-
<MicrosoftNetCompilersToolsetPackageVersion>5.0.0-2.25380.11</MicrosoftNetCompilersToolsetPackageVersion>
52-
<MicrosoftCodeAnalysisExternalAccessFSharpPackageVersion>5.0.0-2.25380.11</MicrosoftCodeAnalysisExternalAccessFSharpPackageVersion>
53-
<MicrosoftCommonLanguageServerProtocolFrameworkPackageVersion>5.0.0-2.25380.11</MicrosoftCommonLanguageServerProtocolFrameworkPackageVersion>
54-
<MicrosoftCodeAnalysisExternalAccessRazorEditorFeaturesPackageVersion>5.0.0-2.25380.11</MicrosoftCodeAnalysisExternalAccessRazorEditorFeaturesPackageVersion>
55-
<MicrosoftCodeAnalysisExternalAccessRazorFeaturesPackageVersion>5.0.0-2.25380.11</MicrosoftCodeAnalysisExternalAccessRazorFeaturesPackageVersion>
56-
<MicrosoftCodeAnalysisCommonPackageVersion>5.0.0-2.25380.11</MicrosoftCodeAnalysisCommonPackageVersion>
57-
<MicrosoftCodeAnalysisCSharpPackageVersion>5.0.0-2.25380.11</MicrosoftCodeAnalysisCSharpPackageVersion>
58-
<MicrosoftCodeAnalysisCSharpEditorFeaturesPackageVersion>5.0.0-2.25380.11</MicrosoftCodeAnalysisCSharpEditorFeaturesPackageVersion>
59-
<MicrosoftCodeAnalysisCSharpFeaturesPackageVersion>5.0.0-2.25380.11</MicrosoftCodeAnalysisCSharpFeaturesPackageVersion>
60-
<MicrosoftCodeAnalysisCSharpWorkspacesPackageVersion>5.0.0-2.25380.11</MicrosoftCodeAnalysisCSharpWorkspacesPackageVersion>
61-
<MicrosoftCodeAnalysisEditorFeaturesPackageVersion>5.0.0-2.25380.11</MicrosoftCodeAnalysisEditorFeaturesPackageVersion>
62-
<MicrosoftCodeAnalysisEditorFeaturesCommonPackageVersion>5.0.0-2.25380.11</MicrosoftCodeAnalysisEditorFeaturesCommonPackageVersion>
63-
<MicrosoftCodeAnalysisEditorFeaturesTextPackageVersion>5.0.0-2.25380.11</MicrosoftCodeAnalysisEditorFeaturesTextPackageVersion>
64-
<MicrosoftCodeAnalysisLanguageServerProtocolPackageVersion>5.0.0-2.25380.11</MicrosoftCodeAnalysisLanguageServerProtocolPackageVersion>
65-
<MicrosoftCodeAnalysisRemoteServiceHubPackageVersion>5.0.0-2.25380.11</MicrosoftCodeAnalysisRemoteServiceHubPackageVersion>
66-
<MicrosoftCodeAnalysisTestUtilitiesPackageVersion>5.0.0-2.25380.11</MicrosoftCodeAnalysisTestUtilitiesPackageVersion>
67-
<MicrosoftCodeAnalysisVisualBasicWorkspacesPackageVersion>5.0.0-2.25380.11</MicrosoftCodeAnalysisVisualBasicWorkspacesPackageVersion>
68-
<MicrosoftCodeAnalysisWorkspacesCommonPackageVersion>5.0.0-2.25380.11</MicrosoftCodeAnalysisWorkspacesCommonPackageVersion>
69-
<MicrosoftCodeAnalysisWorkspacesMSBuildPackageVersion>5.0.0-2.25380.11</MicrosoftCodeAnalysisWorkspacesMSBuildPackageVersion>
70-
<MicrosoftVisualStudioLanguageServicesPackageVersion>5.0.0-2.25380.11</MicrosoftVisualStudioLanguageServicesPackageVersion>
71-
<!--
72-
Exception - Microsoft.Extensions.ObjectPool and System.Collections.Immutable packages are not updated by automation,
73-
but are present in Version.Details.xml for source-build PVP flow. See the comment in Version.Details.xml for more information.
74-
-->
75-
<MicrosoftExtensionsObjectPoolPackageVersion>8.0.0</MicrosoftExtensionsObjectPoolPackageVersion>
76-
<SystemCollectionsImmutablePackageVersion>9.0.0</SystemCollectionsImmutablePackageVersion>
77-
<SystemReflectionMetadataPackageVersion>9.0.0</SystemReflectionMetadataPackageVersion>
78-
</PropertyGroup>
79-
<!--
80-
81-
^^^^^^^^^^
82-
SEE NOTE ABOVE.
83-
84-
Versions above this comment are updated automatically. Don't change them manually.
85-
8641
Versions below this comment are not managed by automation and can be changed as needed.
8742
-->
8843
<PropertyGroup Label="Manual">
@@ -92,7 +47,6 @@
9247
These are properties that control the versions of the various packages that are used in arcade. They control
9348
PackageReference versions directly in arcade.
9449
-->
95-
<MicrosoftNetCompilersToolsetVersion>$(MicrosoftNetCompilersToolsetPackageVersion)</MicrosoftNetCompilersToolsetVersion>
9650
<XUnitVersion>2.9.2</XUnitVersion>
9751
<XUnitAnalyzersVersion>1.7.0</XUnitAnalyzersVersion>
9852
</PropertyGroup>

eng/scripts/CodeCheck.ps1

Lines changed: 0 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -39,51 +39,6 @@ try {
3939
& $PSScriptRoot\..\common\build.ps1 -ci -prepareMachine -build:$false -restore:$false
4040
}
4141

42-
Write-Host "Checking that Versions.props and Version.Details.xml match"
43-
[xml] $versionProps = Get-Content "$repoRoot/eng/Versions.props"
44-
[System.Xml.XmlNamespaceManager] $nsMgr = New-Object -TypeName System.Xml.XmlNamespaceManager($versionProps.NameTable)
45-
$nsMgr.AddNamespace("ns", "http://schemas.microsoft.com/developer/msbuild/2003");
46-
47-
[xml] $versionDetails = Get-Content "$repoRoot/eng/Version.Details.xml"
48-
49-
$versionVars = New-Object 'System.Collections.Generic.HashSet[string]'
50-
foreach ($vars in $versionProps.SelectNodes("//ns:PropertyGroup[`@Label=`"Automated`"]/*", $nsMgr)) {
51-
$versionVars.Add($vars.Name) | Out-Null
52-
}
53-
54-
foreach ($dep in $versionDetails.SelectNodes('//Dependency')) {
55-
if ($dep.Name -eq 'Microsoft.DotNet.Arcade.Sdk') {
56-
# Special case - this version is in global.json, not Version.props
57-
continue
58-
}
59-
Write-Verbose "Found $dep"
60-
$varName = $dep.Name -replace '\.',''
61-
$varName = $varName -replace '\-',''
62-
$varName = "${varName}PackageVersion"
63-
$versionVar = $versionProps.SelectSingleNode("//ns:PropertyGroup[`@Label=`"Automated`"]/ns:$varName", $nsMgr)
64-
if (-not $versionVar) {
65-
LogError "Missing version variable '$varName' in the 'Automated' property group in $repoRoot/eng/Versions.props"
66-
continue
67-
}
68-
69-
$versionVars.Remove($varName) | Out-Null
70-
71-
$expectedVersion = $dep.Version
72-
$actualVersion = $versionVar.InnerText
73-
74-
if ($expectedVersion -ne $actualVersion) {
75-
LogError `
76-
"Version variable '$varName' does not match the value in Version.Details.xml. Expected '$expectedVersion', actual '$actualVersion'" `
77-
-filepath "$repoRoot\eng\Versions.props"
78-
}
79-
}
80-
81-
foreach ($unexpectedVar in $versionVars) {
82-
LogError `
83-
"Version variable '$unexpectedVar' does not have a matching entry in Version.Details.xml. See https://github.com/dotnet/aspnetcore/blob/main/docs/ReferenceResolution.md for instructions on how to add a new dependency." `
84-
-filepath "$repoRoot\eng\Versions.props"
85-
}
86-
8742
Write-Host "Checking that solutions are up to date"
8843

8944
Get-ChildItem "$repoRoot/*.sln" -Recurse `

src/Compiler/Microsoft.AspNetCore.Razor.Language/test/HtmlConventionsTest.cs

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,15 @@
33

44
#nullable disable
55

6+
using System;
7+
using System.Text.RegularExpressions;
68
using Xunit;
79

810
namespace Microsoft.AspNetCore.Razor.Language;
911

1012
public class HtmlConventionsTest
1113
{
12-
public static TheoryData HtmlConversionData
14+
public static TheoryData<string, string> HtmlConversionData
1315
{
1416
get
1517
{
@@ -22,11 +24,21 @@ public static TheoryData HtmlConversionData
2224
{ "ALLCAPS", "allcaps" },
2325
{ "One1Two2Three3", "one1-two2-three3" },
2426
{ "ONE1TWO2THREE3", "one1two2three3" },
25-
{ "First_Second_ThirdHi", "first_second_third-hi" }
27+
{ "First_Second_ThirdHi", "first_second_third-hi" },
28+
{ "ONE1Two", "one1-two" },
29+
{ "One123Two234Three345", "one123-two234-three345" },
30+
{ "ONE123TWO234THREE345", "one123two234three345" },
31+
{ "1TWO2THREE3", "1two2three3" },
32+
{ "alllowercase", "alllowercase" },
2633
};
2734
}
2835
}
2936

37+
private static readonly Regex OldHtmlCaseRegex = new Regex(
38+
"(?<!^)((?<=[a-zA-Z0-9])[A-Z][a-z])|((?<=[a-z])[A-Z])",
39+
RegexOptions.None,
40+
TimeSpan.FromMilliseconds(500));
41+
3042
[Theory]
3143
[MemberData(nameof(HtmlConversionData))]
3244
public void ToHtmlCase_ReturnsExpectedConversions(string input, string expectedOutput)
@@ -35,6 +47,10 @@ public void ToHtmlCase_ReturnsExpectedConversions(string input, string expectedO
3547
var output = HtmlConventions.ToHtmlCase(input);
3648

3749
// Assert
38-
Assert.Equal(output, expectedOutput);
50+
Assert.Equal(expectedOutput, output);
51+
52+
// Assure backwards compatibility with regex
53+
var regexResult = OldHtmlCaseRegex.Replace(input, "-$1$2").ToLowerInvariant();
54+
Assert.Equal(regexResult, output);
3955
}
4056
}

0 commit comments

Comments
 (0)