Skip to content

Commit

Permalink
Bump LSP protocol version (#61494)
Browse files Browse the repository at this point in the history
* Bump protocol version

* React to breaking changes in foldingrangekind
  • Loading branch information
dibarbet authored May 24, 2022
1 parent 5d93b7b commit 2f067e9
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
2 changes: 1 addition & 1 deletion eng/Versions.props
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
<VisualStudioEditorPackagesVersion>17.2.3194</VisualStudioEditorPackagesVersion>
<ILAsmPackageVersion>5.0.0-alpha1.19409.1</ILAsmPackageVersion>
<ILDAsmPackageVersion>5.0.0-preview.1.20112.8</ILDAsmPackageVersion>
<MicrosoftVisualStudioLanguageServerProtocolPackagesVersion>17.3.5</MicrosoftVisualStudioLanguageServerProtocolPackagesVersion>
<MicrosoftVisualStudioLanguageServerProtocolPackagesVersion>17.3.15</MicrosoftVisualStudioLanguageServerProtocolPackagesVersion>
<MicrosoftVisualStudioShellPackagesVersion>17.2.32505.113</MicrosoftVisualStudioShellPackagesVersion>
<RefOnlyMicrosoftBuildPackagesVersion>16.5.0</RefOnlyMicrosoftBuildPackagesVersion>
<!-- The version of Roslyn we build Source Generators against that are built in this
Expand Down
15 changes: 9 additions & 6 deletions src/Features/Lsif/GeneratorTest/FoldingRangeTests.vb
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,14 @@ class C{|foldingRange:
#endregion|}", Nothing)>
<InlineData("
using {|foldingRange:System;
using System.Linq;|}", FoldingRangeKind.Imports)>
using System.Linq;|}", "imports")>
<InlineData("
using {|foldingRange:S = System.String;
using System.Linq;|}", FoldingRangeKind.Imports)>
using System.Linq;|}", "imports")>
<InlineData("
{|foldingRange:// Comment Line 1
// Comment Line 2|}", Nothing)>
Public Async Function TestFoldingRanges(code As String, rangeKind As FoldingRangeKind?) As Task
Public Async Function TestFoldingRanges(code As String, rangeKind As String) As Task
Using workspace = TestWorkspace.CreateWorkspace(
<Workspace>
<Project Language="C#" AssemblyName=<%= TestProjectAssemblyName %> FilePath="Z:\TestProject.csproj" CommonReferences="true">
Expand All @@ -64,15 +64,18 @@ using System.Linq;|}", FoldingRangeKind.Imports)>
End Using
End Function

Private Shared Function CreateFoldingRange(kind As FoldingRangeKind?, range As Range) As FoldingRange
Return New FoldingRange() With
Private Shared Function CreateFoldingRange(kind As String, range As Range) As FoldingRange
Dim foldingRange As FoldingRange = New FoldingRange() With
{
.Kind = kind,
.StartCharacter = range.Start.Character,
.EndCharacter = range.End.Character,
.StartLine = range.Start.Line,
.EndLine = range.End.Line
}
If kind IsNot Nothing Then
foldingRange.Kind = New FoldingRangeKind(kind)
End If
Return foldingRange
End Function
End Class
End Namespace

0 comments on commit 2f067e9

Please sign in to comment.