diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 45d45ac41..cfcad3d57 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -2,10 +2,9 @@ name: OmniSharp-VSCode CI on: push: - branches: [ master ] + branches: [ master, feature/** ] pull_request: - branches: [ master ] jobs: build: diff --git a/.github/workflows/server-ci.yml b/.github/workflows/server-ci.yml new file mode 100644 index 000000000..d6ab324bd --- /dev/null +++ b/.github/workflows/server-ci.yml @@ -0,0 +1,23 @@ +name: Microsoft.CodeAnalysis.LanguageServer CI + +on: + push: + branches: [ master, feature/** ] + + pull_request: + +jobs: + build: + runs-on: ubuntu-latest + timeout-minutes: 30 + + steps: + - uses: actions/checkout@v2 + + - name: Install .NET SDK from global.json + uses: actions/setup-dotnet@v3 + with: + global-json-file: server/global.json + + - name: Build Microsoft.CodeAnalysis.LanguageServer + run: dotnet build ./server/Microsoft.CodeAnalysis.LanguageServer.sln -warnaserror diff --git a/server/Microsoft.CodeAnalysis.LanguageServer/JsonRpcServer.cs b/server/Microsoft.CodeAnalysis.LanguageServer/JsonRpcServer.cs index 2d57e6b8f..8bd26f197 100644 --- a/server/Microsoft.CodeAnalysis.LanguageServer/JsonRpcServer.cs +++ b/server/Microsoft.CodeAnalysis.LanguageServer/JsonRpcServer.cs @@ -7,12 +7,13 @@ using StreamJsonRpc; namespace Microsoft.CodeAnalysis.LanguageServer; -internal sealed class JsonRpcServer : IDisposable + +internal sealed class RoslynLanguageServer : IDisposable { private readonly JsonRpc _jsonRpc; private readonly ILogger _logger; - public JsonRpcServer(Stream inputStream, Stream outputStream, ILogger logger) + public RoslynLanguageServer(Stream inputStream, Stream outputStream, ILogger logger) { _logger = logger; diff --git a/server/Microsoft.CodeAnalysis.LanguageServer/Program.cs b/server/Microsoft.CodeAnalysis.LanguageServer/Program.cs index edce26cf8..7c2146228 100644 --- a/server/Microsoft.CodeAnalysis.LanguageServer/Program.cs +++ b/server/Microsoft.CodeAnalysis.LanguageServer/Program.cs @@ -2,11 +2,10 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +using System.Diagnostics; using Microsoft.CodeAnalysis.LanguageServer; using Microsoft.Extensions.Logging; -using System.Diagnostics; - Console.Title = "Microsoft.CodeAnalysis.LanguageServer"; // TODO - Decide how and where we're logging. For now just logging stderr (vscode reads stdout for LSP messages). @@ -19,10 +18,12 @@ LaunchDebuggerIfEnabled(args); -var jsonRpc = new JsonRpcServer(Console.OpenStandardInput(), Console.OpenStandardOutput(), logger); +var jsonRpc = new RoslynLanguageServer(Console.OpenStandardInput(), Console.OpenStandardOutput(), logger); await jsonRpc.StartAsync(); +return; + void LaunchDebuggerIfEnabled(string[] args) { if (args.Contains("--debug") && !Debugger.IsAttached) diff --git a/server/global.json b/server/global.json index ac9ad9e7a..52534e2d8 100644 --- a/server/global.json +++ b/server/global.json @@ -1,5 +1,5 @@ { "sdk": { - "version": "7.0.100-rc.2" + "version": "7.0.100-rc.2.22477.23" } } \ No newline at end of file