Skip to content

Commit 0b748ca

Browse files
author
N. Taylor Mullen
committed
Update our LanguageServer OmniSharp lib package version.
- Consuming several quality of life changes from O#. Such as support multiple languages in file paths. - This also prepares us to take the TextDocumentSynchronization fixes started here: OmniSharp/csharp-language-server-protocol#199
1 parent 17a8a2b commit 0b748ca

11 files changed

+12
-15
lines changed

eng/Versions.props

+1-1
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@
118118
<MoqPackageVersion>4.10.0</MoqPackageVersion>
119119
<!-- STOP!!! We need to reference the version of JSON that our HOSTS supprt. -->
120120
<NewtonsoftJsonPackageVersion>9.0.1</NewtonsoftJsonPackageVersion>
121-
<OmniSharpExtensionsLanguageServerPackageVersion>0.13.1</OmniSharpExtensionsLanguageServerPackageVersion>
121+
<OmniSharpExtensionsLanguageServerPackageVersion>0.14.1</OmniSharpExtensionsLanguageServerPackageVersion>
122122
<OmniSharpMSBuildPackageVersion>1.33.0</OmniSharpMSBuildPackageVersion>
123123
<VS_NewtonsoftJsonPackageVersion>12.0.1</VS_NewtonsoftJsonPackageVersion>
124124
<VSMAC_NewtonsoftJsonPackageVersion>12.0.2</VSMAC_NewtonsoftJsonPackageVersion>

src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Program.cs

+2-5
Original file line numberDiff line numberDiff line change
@@ -58,15 +58,12 @@ public static async Task MainAsync(string[] args)
5858

5959
Serializer.Instance.JsonSerializer.Converters.RegisterRazorConverters();
6060

61-
var factory = new LoggerFactory();
6261
ILanguageServer server = null;
6362
server = await OmniSharp.Extensions.LanguageServer.Server.LanguageServer.From(options =>
6463
options
6564
.WithInput(Console.OpenStandardInput())
6665
.WithOutput(Console.OpenStandardOutput())
67-
.WithLoggerFactory(factory)
68-
.AddDefaultLoggingProvider()
69-
.WithMinimumLogLevel(logLevel)
66+
.ConfigureLogging(builder => builder.SetMinimumLevel(logLevel))
7067
.WithHandler<RazorDocumentSynchronizationEndpoint>()
7168
.WithHandler<RazorCompletionEndpoint>()
7269
.WithHandler<RazorHoverEndpoint>()
@@ -121,10 +118,10 @@ public static async Task MainAsync(string[] args)
121118

122119
// Workaround for https://github.com/OmniSharp/csharp-language-server-protocol/issues/106
123120
var languageServer = (OmniSharp.Extensions.LanguageServer.Server.LanguageServer)server;
124-
languageServer.MinimumLogLevel = logLevel;
125121

126122
try
127123
{
124+
var factory = new LoggerFactory();
128125
var logger = factory.CreateLogger<Program>();
129126
var assemblyInformationAttribute = typeof(Program).Assembly.GetCustomAttribute<AssemblyInformationalVersionAttribute>();
130127
logger.LogInformation("Razor Language Server version " + assemblyInformationAttribute.InformationalVersion);

src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/ProjectSystem/AddDocumentParams.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// Copyright (c) .NET Foundation. All rights reserved.
22
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
33

4-
using OmniSharp.Extensions.Embedded.MediatR;
4+
using MediatR;
55

66
namespace Microsoft.AspNetCore.Razor.LanguageServer.ProjectSystem
77
{

src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/ProjectSystem/RazorAddProjectParams.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// Copyright (c) .NET Foundation. All rights reserved.
22
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
33

4-
using OmniSharp.Extensions.Embedded.MediatR;
4+
using MediatR;
55

66
namespace Microsoft.AspNetCore.Razor.LanguageServer.ProjectSystem
77
{

src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/ProjectSystem/RazorRemoveProjectParams.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// Copyright (c) .NET Foundation. All rights reserved.
22
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
33

4-
using OmniSharp.Extensions.Embedded.MediatR;
4+
using MediatR;
55

66
namespace Microsoft.AspNetCore.Razor.LanguageServer.ProjectSystem
77
{

src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/ProjectSystem/RazorUpdateProjectParams.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
33

44
using Microsoft.AspNetCore.Razor.LanguageServer.Common.Serialization;
5-
using OmniSharp.Extensions.Embedded.MediatR;
5+
using MediatR;
66

77
namespace Microsoft.AspNetCore.Razor.LanguageServer.ProjectSystem
88
{

src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/ProjectSystem/RemoveDocumentParams.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// Copyright (c) .NET Foundation. All rights reserved.
22
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
33

4-
using OmniSharp.Extensions.Embedded.MediatR;
4+
using MediatR;
55

66
namespace Microsoft.AspNetCore.Razor.LanguageServer.ProjectSystem
77
{

src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/RazorDocumentSynchronizationEndpoint.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@
55
using System.Collections.Generic;
66
using System.Threading;
77
using System.Threading.Tasks;
8+
using MediatR;
89
using Microsoft.AspNetCore.Razor.LanguageServer.ProjectSystem;
910
using Microsoft.CodeAnalysis.Razor;
1011
using Microsoft.CodeAnalysis.Text;
1112
using Microsoft.Extensions.Logging;
12-
using OmniSharp.Extensions.Embedded.MediatR;
1313
using OmniSharp.Extensions.LanguageServer.Protocol;
1414
using OmniSharp.Extensions.LanguageServer.Protocol.Client.Capabilities;
1515
using OmniSharp.Extensions.LanguageServer.Protocol.Models;

src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/RazorLanguageQueryParams.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
33

44
using System;
5-
using OmniSharp.Extensions.Embedded.MediatR;
5+
using MediatR;
66
using OmniSharp.Extensions.LanguageServer.Protocol.Models;
77

88
namespace Microsoft.AspNetCore.Razor.LanguageServer

src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/RazorMapToDocumentRangeParams.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
33

44
using System;
5-
using OmniSharp.Extensions.Embedded.MediatR;
5+
using MediatR;
66
using Range = OmniSharp.Extensions.LanguageServer.Protocol.Models.Range;
77

88
namespace Microsoft.AspNetCore.Razor.LanguageServer

src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/RazorProjectEndpoint.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@
44
using System;
55
using System.Threading;
66
using System.Threading.Tasks;
7+
using MediatR;
78
using Microsoft.AspNetCore.Razor.LanguageServer.Common.Serialization;
89
using Microsoft.AspNetCore.Razor.LanguageServer.ProjectSystem;
910
using Microsoft.CodeAnalysis.Razor;
1011
using Microsoft.CodeAnalysis.Razor.ProjectSystem;
1112
using Microsoft.Extensions.Logging;
12-
using OmniSharp.Extensions.Embedded.MediatR;
1313

1414
namespace Microsoft.AspNetCore.Razor.LanguageServer
1515
{

0 commit comments

Comments
 (0)