Skip to content
Merged
Show file tree
Hide file tree
Changes from 14 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
42 changes: 21 additions & 21 deletions eng/Version.Details.props
Original file line number Diff line number Diff line change
Expand Up @@ -6,27 +6,27 @@ This file should be imported by eng/Versions.props
<Project>
<PropertyGroup>
<!-- dotnet/roslyn dependencies -->
<MicrosoftCodeAnalysisAnalyzersPackageVersion>5.3.0-2.25567.17</MicrosoftCodeAnalysisAnalyzersPackageVersion>
<MicrosoftCodeAnalysisCommonPackageVersion>5.3.0-2.25567.17</MicrosoftCodeAnalysisCommonPackageVersion>
<MicrosoftCodeAnalysisCSharpPackageVersion>5.3.0-2.25567.17</MicrosoftCodeAnalysisCSharpPackageVersion>
<MicrosoftCodeAnalysisCSharpEditorFeaturesPackageVersion>5.3.0-2.25567.17</MicrosoftCodeAnalysisCSharpEditorFeaturesPackageVersion>
<MicrosoftCodeAnalysisCSharpFeaturesPackageVersion>5.3.0-2.25567.17</MicrosoftCodeAnalysisCSharpFeaturesPackageVersion>
<MicrosoftCodeAnalysisCSharpWorkspacesPackageVersion>5.3.0-2.25567.17</MicrosoftCodeAnalysisCSharpWorkspacesPackageVersion>
<MicrosoftCodeAnalysisEditorFeaturesPackageVersion>5.3.0-2.25567.17</MicrosoftCodeAnalysisEditorFeaturesPackageVersion>
<MicrosoftCodeAnalysisEditorFeaturesCommonPackageVersion>5.3.0-2.25567.17</MicrosoftCodeAnalysisEditorFeaturesCommonPackageVersion>
<MicrosoftCodeAnalysisEditorFeaturesTextPackageVersion>5.3.0-2.25567.17</MicrosoftCodeAnalysisEditorFeaturesTextPackageVersion>
<MicrosoftCodeAnalysisExternalAccessFSharpPackageVersion>5.3.0-2.25567.17</MicrosoftCodeAnalysisExternalAccessFSharpPackageVersion>
<MicrosoftCodeAnalysisExternalAccessRazorEditorFeaturesPackageVersion>5.3.0-2.25567.17</MicrosoftCodeAnalysisExternalAccessRazorEditorFeaturesPackageVersion>
<MicrosoftCodeAnalysisExternalAccessRazorFeaturesPackageVersion>5.3.0-2.25567.17</MicrosoftCodeAnalysisExternalAccessRazorFeaturesPackageVersion>
<MicrosoftCodeAnalysisLanguageServerProtocolPackageVersion>5.3.0-2.25567.17</MicrosoftCodeAnalysisLanguageServerProtocolPackageVersion>
<MicrosoftCodeAnalysisRemoteServiceHubPackageVersion>5.3.0-2.25567.17</MicrosoftCodeAnalysisRemoteServiceHubPackageVersion>
<MicrosoftCodeAnalysisTestUtilitiesPackageVersion>5.3.0-2.25567.17</MicrosoftCodeAnalysisTestUtilitiesPackageVersion>
<MicrosoftCodeAnalysisVisualBasicWorkspacesPackageVersion>5.3.0-2.25567.17</MicrosoftCodeAnalysisVisualBasicWorkspacesPackageVersion>
<MicrosoftCodeAnalysisWorkspacesCommonPackageVersion>5.3.0-2.25567.17</MicrosoftCodeAnalysisWorkspacesCommonPackageVersion>
<MicrosoftCodeAnalysisWorkspacesMSBuildPackageVersion>5.3.0-2.25567.17</MicrosoftCodeAnalysisWorkspacesMSBuildPackageVersion>
<MicrosoftCommonLanguageServerProtocolFrameworkPackageVersion>5.3.0-2.25567.17</MicrosoftCommonLanguageServerProtocolFrameworkPackageVersion>
<MicrosoftNetCompilersToolsetPackageVersion>5.3.0-2.25567.17</MicrosoftNetCompilersToolsetPackageVersion>
<MicrosoftVisualStudioLanguageServicesPackageVersion>5.3.0-2.25567.17</MicrosoftVisualStudioLanguageServicesPackageVersion>
<MicrosoftCodeAnalysisAnalyzersPackageVersion>5.3.0-2.25601.4</MicrosoftCodeAnalysisAnalyzersPackageVersion>
<MicrosoftCodeAnalysisCommonPackageVersion>5.3.0-2.25601.4</MicrosoftCodeAnalysisCommonPackageVersion>
<MicrosoftCodeAnalysisCSharpPackageVersion>5.3.0-2.25601.4</MicrosoftCodeAnalysisCSharpPackageVersion>
<MicrosoftCodeAnalysisCSharpEditorFeaturesPackageVersion>5.3.0-2.25601.4</MicrosoftCodeAnalysisCSharpEditorFeaturesPackageVersion>
<MicrosoftCodeAnalysisCSharpFeaturesPackageVersion>5.3.0-2.25601.4</MicrosoftCodeAnalysisCSharpFeaturesPackageVersion>
<MicrosoftCodeAnalysisCSharpWorkspacesPackageVersion>5.3.0-2.25601.4</MicrosoftCodeAnalysisCSharpWorkspacesPackageVersion>
<MicrosoftCodeAnalysisEditorFeaturesPackageVersion>5.3.0-2.25601.4</MicrosoftCodeAnalysisEditorFeaturesPackageVersion>
<MicrosoftCodeAnalysisEditorFeaturesCommonPackageVersion>5.3.0-2.25601.4</MicrosoftCodeAnalysisEditorFeaturesCommonPackageVersion>
<MicrosoftCodeAnalysisEditorFeaturesTextPackageVersion>5.3.0-2.25601.4</MicrosoftCodeAnalysisEditorFeaturesTextPackageVersion>
<MicrosoftCodeAnalysisExternalAccessFSharpPackageVersion>5.3.0-2.25601.4</MicrosoftCodeAnalysisExternalAccessFSharpPackageVersion>
<MicrosoftCodeAnalysisExternalAccessRazorEditorFeaturesPackageVersion>5.3.0-2.25601.4</MicrosoftCodeAnalysisExternalAccessRazorEditorFeaturesPackageVersion>
<MicrosoftCodeAnalysisExternalAccessRazorFeaturesPackageVersion>5.3.0-2.25601.4</MicrosoftCodeAnalysisExternalAccessRazorFeaturesPackageVersion>
<MicrosoftCodeAnalysisLanguageServerProtocolPackageVersion>5.3.0-2.25601.4</MicrosoftCodeAnalysisLanguageServerProtocolPackageVersion>
<MicrosoftCodeAnalysisRemoteServiceHubPackageVersion>5.3.0-2.25601.4</MicrosoftCodeAnalysisRemoteServiceHubPackageVersion>
<MicrosoftCodeAnalysisTestUtilitiesPackageVersion>5.3.0-2.25601.4</MicrosoftCodeAnalysisTestUtilitiesPackageVersion>
<MicrosoftCodeAnalysisVisualBasicWorkspacesPackageVersion>5.3.0-2.25601.4</MicrosoftCodeAnalysisVisualBasicWorkspacesPackageVersion>
<MicrosoftCodeAnalysisWorkspacesCommonPackageVersion>5.3.0-2.25601.4</MicrosoftCodeAnalysisWorkspacesCommonPackageVersion>
<MicrosoftCodeAnalysisWorkspacesMSBuildPackageVersion>5.3.0-2.25601.4</MicrosoftCodeAnalysisWorkspacesMSBuildPackageVersion>
<MicrosoftCommonLanguageServerProtocolFrameworkPackageVersion>5.3.0-2.25601.4</MicrosoftCommonLanguageServerProtocolFrameworkPackageVersion>
<MicrosoftNetCompilersToolsetPackageVersion>5.3.0-2.25601.4</MicrosoftNetCompilersToolsetPackageVersion>
<MicrosoftVisualStudioLanguageServicesPackageVersion>5.3.0-2.25601.4</MicrosoftVisualStudioLanguageServicesPackageVersion>
<!-- dotnet/arcade dependencies -->
<MicrosoftDotNetArcadeSdkPackageVersion>9.0.0-beta.25515.2</MicrosoftDotNetArcadeSdkPackageVersion>
<!-- dotnet/aspnetcore dependencies -->
Expand Down
84 changes: 42 additions & 42 deletions eng/Version.Details.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,89 +2,89 @@
<Dependencies>
<Source Uri="https://github.com/dotnet/dotnet" Mapping="razor" Sha="cc7f6e84d8dae36ad9ea51a5112627b8235982cc" BarId="291900" />
<ProductDependencies>
<Dependency Name="Microsoft.Net.Compilers.Toolset" Version="5.3.0-2.25567.17">
<Dependency Name="Microsoft.Net.Compilers.Toolset" Version="5.3.0-2.25601.4">
<Uri>https://github.com/dotnet/roslyn</Uri>
<Sha>f38878a015e28dedf874b0c98b15bd14906dab63</Sha>
<Sha>a618d6246ead857f8c7de055bfde0f3438aa136a</Sha>
</Dependency>
<Dependency Name="Microsoft.CommonLanguageServerProtocol.Framework" Version="5.3.0-2.25567.17">
<Dependency Name="Microsoft.CommonLanguageServerProtocol.Framework" Version="5.3.0-2.25601.4">
<Uri>https://github.com/dotnet/roslyn</Uri>
<Sha>f38878a015e28dedf874b0c98b15bd14906dab63</Sha>
<Sha>a618d6246ead857f8c7de055bfde0f3438aa136a</Sha>
</Dependency>
<Dependency Name="Microsoft.CodeAnalysis.Common" Version="5.3.0-2.25567.17">
<Dependency Name="Microsoft.CodeAnalysis.Common" Version="5.3.0-2.25601.4">
<Uri>https://github.com/dotnet/roslyn</Uri>
<Sha>f38878a015e28dedf874b0c98b15bd14906dab63</Sha>
<Sha>a618d6246ead857f8c7de055bfde0f3438aa136a</Sha>
</Dependency>
<Dependency Name="Microsoft.CodeAnalysis.CSharp" Version="5.3.0-2.25567.17">
<Dependency Name="Microsoft.CodeAnalysis.CSharp" Version="5.3.0-2.25601.4">
<Uri>https://github.com/dotnet/roslyn</Uri>
<Sha>f38878a015e28dedf874b0c98b15bd14906dab63</Sha>
<Sha>a618d6246ead857f8c7de055bfde0f3438aa136a</Sha>
</Dependency>
<Dependency Name="Microsoft.CodeAnalysis.CSharp.EditorFeatures" Version="5.3.0-2.25567.17">
<Dependency Name="Microsoft.CodeAnalysis.CSharp.EditorFeatures" Version="5.3.0-2.25601.4">
<Uri>https://github.com/dotnet/roslyn</Uri>
<Sha>f38878a015e28dedf874b0c98b15bd14906dab63</Sha>
<Sha>a618d6246ead857f8c7de055bfde0f3438aa136a</Sha>
</Dependency>
<Dependency Name="Microsoft.CodeAnalysis.CSharp.Features" Version="5.3.0-2.25567.17">
<Dependency Name="Microsoft.CodeAnalysis.CSharp.Features" Version="5.3.0-2.25601.4">
<Uri>https://github.com/dotnet/roslyn</Uri>
<Sha>f38878a015e28dedf874b0c98b15bd14906dab63</Sha>
<Sha>a618d6246ead857f8c7de055bfde0f3438aa136a</Sha>
</Dependency>
<Dependency Name="Microsoft.CodeAnalysis.CSharp.Workspaces" Version="5.3.0-2.25567.17">
<Dependency Name="Microsoft.CodeAnalysis.CSharp.Workspaces" Version="5.3.0-2.25601.4">
<Uri>https://github.com/dotnet/roslyn</Uri>
<Sha>f38878a015e28dedf874b0c98b15bd14906dab63</Sha>
<Sha>a618d6246ead857f8c7de055bfde0f3438aa136a</Sha>
</Dependency>
<Dependency Name="Microsoft.CodeAnalysis.EditorFeatures" Version="5.3.0-2.25567.17">
<Dependency Name="Microsoft.CodeAnalysis.EditorFeatures" Version="5.3.0-2.25601.4">
<Uri>https://github.com/dotnet/roslyn</Uri>
<Sha>f38878a015e28dedf874b0c98b15bd14906dab63</Sha>
<Sha>a618d6246ead857f8c7de055bfde0f3438aa136a</Sha>
</Dependency>
<Dependency Name="Microsoft.CodeAnalysis.EditorFeatures.Common" Version="5.3.0-2.25567.17">
<Dependency Name="Microsoft.CodeAnalysis.EditorFeatures.Common" Version="5.3.0-2.25601.4">
<Uri>https://github.com/dotnet/roslyn</Uri>
<Sha>f38878a015e28dedf874b0c98b15bd14906dab63</Sha>
<Sha>a618d6246ead857f8c7de055bfde0f3438aa136a</Sha>
</Dependency>
<Dependency Name="Microsoft.CodeAnalysis.EditorFeatures.Text" Version="5.3.0-2.25567.17">
<Dependency Name="Microsoft.CodeAnalysis.EditorFeatures.Text" Version="5.3.0-2.25601.4">
<Uri>https://github.com/dotnet/roslyn</Uri>
<Sha>f38878a015e28dedf874b0c98b15bd14906dab63</Sha>
<Sha>a618d6246ead857f8c7de055bfde0f3438aa136a</Sha>
</Dependency>
<Dependency Name="Microsoft.CodeAnalysis.Remote.ServiceHub" Version="5.3.0-2.25567.17">
<Dependency Name="Microsoft.CodeAnalysis.Remote.ServiceHub" Version="5.3.0-2.25601.4">
<Uri>https://github.com/dotnet/roslyn</Uri>
<Sha>f38878a015e28dedf874b0c98b15bd14906dab63</Sha>
<Sha>a618d6246ead857f8c7de055bfde0f3438aa136a</Sha>
</Dependency>
<Dependency Name="Microsoft.CodeAnalysis.VisualBasic.Workspaces" Version="5.3.0-2.25567.17">
<Dependency Name="Microsoft.CodeAnalysis.VisualBasic.Workspaces" Version="5.3.0-2.25601.4">
<Uri>https://github.com/dotnet/roslyn</Uri>
<Sha>f38878a015e28dedf874b0c98b15bd14906dab63</Sha>
<Sha>a618d6246ead857f8c7de055bfde0f3438aa136a</Sha>
</Dependency>
<Dependency Name="Microsoft.CodeAnalysis.Workspaces.Common" Version="5.3.0-2.25567.17">
<Dependency Name="Microsoft.CodeAnalysis.Workspaces.Common" Version="5.3.0-2.25601.4">
<Uri>https://github.com/dotnet/roslyn</Uri>
<Sha>f38878a015e28dedf874b0c98b15bd14906dab63</Sha>
<Sha>a618d6246ead857f8c7de055bfde0f3438aa136a</Sha>
</Dependency>
<Dependency Name="Microsoft.CodeAnalysis.Workspaces.MSBuild" Version="5.3.0-2.25567.17">
<Dependency Name="Microsoft.CodeAnalysis.Workspaces.MSBuild" Version="5.3.0-2.25601.4">
<Uri>https://github.com/dotnet/roslyn</Uri>
<Sha>f38878a015e28dedf874b0c98b15bd14906dab63</Sha>
<Sha>a618d6246ead857f8c7de055bfde0f3438aa136a</Sha>
</Dependency>
<Dependency Name="Microsoft.VisualStudio.LanguageServices" Version="5.3.0-2.25567.17">
<Dependency Name="Microsoft.VisualStudio.LanguageServices" Version="5.3.0-2.25601.4">
<Uri>https://github.com/dotnet/roslyn</Uri>
<Sha>f38878a015e28dedf874b0c98b15bd14906dab63</Sha>
<Sha>a618d6246ead857f8c7de055bfde0f3438aa136a</Sha>
</Dependency>
<Dependency Name="Microsoft.CodeAnalysis.Test.Utilities" Version="5.3.0-2.25567.17">
<Dependency Name="Microsoft.CodeAnalysis.Test.Utilities" Version="5.3.0-2.25601.4">
<Uri>https://github.com/dotnet/roslyn</Uri>
<Sha>f38878a015e28dedf874b0c98b15bd14906dab63</Sha>
<Sha>a618d6246ead857f8c7de055bfde0f3438aa136a</Sha>
</Dependency>
<Dependency Name="Microsoft.CodeAnalysis.ExternalAccess.Razor.Features" Version="5.3.0-2.25567.17">
<Dependency Name="Microsoft.CodeAnalysis.ExternalAccess.Razor.Features" Version="5.3.0-2.25601.4">
<Uri>https://github.com/dotnet/roslyn</Uri>
<Sha>f38878a015e28dedf874b0c98b15bd14906dab63</Sha>
<Sha>a618d6246ead857f8c7de055bfde0f3438aa136a</Sha>
</Dependency>
<Dependency Name="Microsoft.CodeAnalysis.ExternalAccess.Razor.EditorFeatures" Version="5.3.0-2.25567.17">
<Dependency Name="Microsoft.CodeAnalysis.ExternalAccess.Razor.EditorFeatures" Version="5.3.0-2.25601.4">
<Uri>https://github.com/dotnet/roslyn</Uri>
<Sha>f38878a015e28dedf874b0c98b15bd14906dab63</Sha>
<Sha>a618d6246ead857f8c7de055bfde0f3438aa136a</Sha>
</Dependency>
<Dependency Name="Microsoft.CodeAnalysis.LanguageServer.Protocol" Version="5.3.0-2.25567.17">
<Dependency Name="Microsoft.CodeAnalysis.LanguageServer.Protocol" Version="5.3.0-2.25601.4">
<Uri>https://github.com/dotnet/roslyn</Uri>
<Sha>f38878a015e28dedf874b0c98b15bd14906dab63</Sha>
<Sha>a618d6246ead857f8c7de055bfde0f3438aa136a</Sha>
</Dependency>
<Dependency Name="Microsoft.CodeAnalysis.ExternalAccess.FSharp" Version="5.3.0-2.25567.17">
<Dependency Name="Microsoft.CodeAnalysis.ExternalAccess.FSharp" Version="5.3.0-2.25601.4">
<Uri>https://github.com/dotnet/roslyn</Uri>
<Sha>f38878a015e28dedf874b0c98b15bd14906dab63</Sha>
<Sha>a618d6246ead857f8c7de055bfde0f3438aa136a</Sha>
</Dependency>
<Dependency Name="Microsoft.CodeAnalysis.Analyzers" Version="5.3.0-2.25567.17">
<Dependency Name="Microsoft.CodeAnalysis.Analyzers" Version="5.3.0-2.25601.4">
<Uri>https://github.com/dotnet/roslyn</Uri>
<Sha>f38878a015e28dedf874b0c98b15bd14906dab63</Sha>
<Sha>a618d6246ead857f8c7de055bfde0f3438aa136a</Sha>
</Dependency>
</ProductDependencies>
<ToolsetDependencies>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,13 @@ public PropertyTable Clone()
return clone;
}

internal PropertyTable ToHostOutput()
{
var clone = new PropertyTable();
Array.Copy(_values, clone._values, Size);
return clone;
}

/// <summary>
/// Provides access to a specific slot within an array for a given reference type.
/// </summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -244,4 +244,14 @@ static void VerifyNamespace(RazorCodeDocument codeDocument, bool fallbackToRootN
[Obsolete("Do not use. Present to support the legacy editor", error: false)]
internal RazorCodeDocument Clone()
=> new(Source, Imports, ParserOptions, CodeGenerationOptions, _properties.Clone());

internal RazorCodeDocument ToHostOutput()
{
return new RazorCodeDocument(
Source,
Imports,
ParserOptions,
CodeGenerationOptions,
_properties.ToHostOutput());
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -117,4 +117,6 @@ static bool IsValidToken(SyntaxToken token, out SyntaxToken validToken)
return false;
}
}

public abstract BaseMarkupEndTagSyntax? GetEndTag();
}
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,9 @@ public bool IsVoidElement()
{
return ParserHelpers.VoidElements.Contains(Name.Content);
}

public override BaseMarkupEndTagSyntax? GetEndTag()
{
return (Parent as MarkupElementSyntax)?.EndTag;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.

namespace Microsoft.AspNetCore.Razor.Language.Syntax;

internal partial class MarkupTagHelperStartTagSyntax
{
public override BaseMarkupEndTagSyntax? GetEndTag()
{
return (Parent as MarkupTagHelperElementSyntax)?.EndTag;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -380,7 +380,10 @@ public void Initialize(IncrementalGeneratorInitializationContext context)

foreach (var (hintName, codeDocument, _) in documents)
{
filePathToDocument.Add(codeDocument.Source.FilePath!, (hintName, codeDocument));
// So that tooling can't observe or influence intermediate state, we don't give them the direct RazorCodeDocument
// that is our working state. Ideally it shouldn't be mutable at all of course
var outputDocument = codeDocument.ToHostOutput();
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This, and the methods, will be superseded by #12533

filePathToDocument.Add(codeDocument.Source.FilePath!, (hintName, outputDocument));
hintNameToFilePath.Add(hintName, codeDocument.Source.FilePath!);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,16 @@
using Microsoft.AspNetCore.Razor.PooledObjects;
using Microsoft.CodeAnalysis.Razor.DocumentMapping;
using Microsoft.CodeAnalysis.Razor.ProjectSystem;
using Microsoft.CodeAnalysis.Razor.Telemetry;
using Microsoft.CodeAnalysis.Razor.Workspaces;

namespace Microsoft.AspNetCore.Razor.LanguageServer;

internal sealed class LspEditMappingService(
IDocumentMappingService documentMappingService,
ITelemetryReporter telemetryReporter,
IFilePathService filePathService,
IDocumentContextFactory documentContextFactory) : AbstractEditMappingService(documentMappingService, filePathService)
IDocumentContextFactory documentContextFactory) : AbstractEditMappingService(documentMappingService, telemetryReporter, filePathService)
{
private readonly IFilePathService _filePathService = filePathService;
private readonly IDocumentContextFactory _documentContextFactory = documentContextFactory;
Expand Down
Loading