Skip to content

Commit c4fbf34

Browse files
Merge pull request #206 from OmniSharp/feature/config
Added OnStarted delegate handler that is called after the server has successfully started +semver:minor
2 parents d26c4dd + e6652ed commit c4fbf34

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

51 files changed

+278
-202
lines changed

.appveyor.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
image: Visual Studio 2017
1+
image: Visual Studio 2019
22
environment:
33
nuget_org_apikey:
44
secure: lFaEHVRMsSWTveDH/DuLl4+hv+O0i4qLkbhW3aCgzq0oCrOuV+0TSEkqe6aiHuNX

.azure-pipelines.yml

+17-16
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@ resources:
2020
variables:
2121
Configuration: Release
2222
Verbosity: Normal
23-
DotNetVersion: "2.2.101"
23+
DotNetVersion: "3.1.101"
2424
CakeVersion: "0.32.1"
25-
NuGetVersion: "4.9.2"
25+
NuGetVersion: "5.4.0"
2626
Coverage: "$(Agent.BuildDirectory)/c"
2727
VstsCoverage: "$(Coverage)"
2828
Artifacts: $(Build.ArtifactStagingDirectory)
@@ -32,7 +32,7 @@ variables:
3232
jobs:
3333
- job: GitVersion
3434
pool:
35-
vmImage: "VS2017-Win2016"
35+
vmImage: "windows-latest"
3636
steps:
3737
- template: gitversion/store.yml@rsg
3838
parameters:
@@ -52,24 +52,25 @@ jobs:
5252
# NuGetVersion: $(NuGetVersion)
5353
# Script: build.cake
5454

55-
- template: pipeline/cake-job.yml@rsg
56-
parameters:
57-
name: 'Linux'
58-
dependsOn: GitVersion
59-
vmImage: "Ubuntu-16.04"
60-
pushNuget: false
61-
Configuration: $(Configuration)
62-
Verbosity: $(Verbosity)
63-
CakeVersion: $(CakeVersion)
64-
DotNetVersion: $(DotNetVersion)
65-
NuGetVersion: $(NuGetVersion)
66-
Script: build.cake
55+
# Disabled temporarily as the template does not support multiple runtimes
56+
# - template: pipeline/cake-job.yml@rsg
57+
# parameters:
58+
# name: 'Linux'
59+
# dependsOn: GitVersion
60+
# vmImage: "ubuntu-latest"
61+
# pushNuget: false
62+
# Configuration: $(Configuration)
63+
# Verbosity: $(Verbosity)
64+
# CakeVersion: $(CakeVersion)
65+
# DotNetVersion: $(DotNetVersion)
66+
# NuGetVersion: $(NuGetVersion)
67+
# Script: build.cake
6768

6869
- template: pipeline/cake-job.yml@rsg
6970
parameters:
7071
name: 'Windows'
7172
dependsOn: GitVersion
72-
vmImage: "VS2017-Win2016"
73+
vmImage: "windows-latest"
7374
pushNuget: true
7475
Configuration: $(Configuration)
7576
Verbosity: $(Verbosity)

Common.Build.props renamed to Directory.Build.props

+1-3
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,14 @@
33
<Company>OmniSharp</Company>
44
<Copyright>Copyright OmniSharp and contributors © 2018</Copyright>
55
<Authors>David Driscoll</Authors>
6-
<LangVersion>latest</LangVersion>
6+
<LangVersion>8</LangVersion>
77
<SignAssembly>true</SignAssembly>
88
<DelaySign>false</DelaySign>
99
<PackageLicenseUrl>https://github.com/OmniSharp/csharp-language-server-protocol/blob/master/LICENSE</PackageLicenseUrl>
1010
<PackageIconUrl>http://www.omnisharp.net/images/logo.png</PackageIconUrl>
1111
<PackageProjectUrl>https://github.com/OmniSharp/csharp-language-server-protocol</PackageProjectUrl>
1212
<PackageTags>lsp;language server;language server protocol;language client;language server client</PackageTags>
1313
<AssemblyOriginatorKeyFile>$(MSBuildThisFileDirectory)\lsp.snk</AssemblyOriginatorKeyFile>
14-
<Logging_Extensions_Version>2.0.0</Logging_Extensions_Version>
15-
<MediatR_Version>7.0.0</MediatR_Version>
1614
</PropertyGroup>
1715
<PropertyGroup>
1816
<EmbedUntrackedSources>true</EmbedUntrackedSources>

Common.Build.targets renamed to Directory.Build.targets

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
<Project>
22
<ItemGroup>
3-
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0-beta2-18618-05" PrivateAssets="All" />
3+
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0" PrivateAssets="All" />
44
</ItemGroup>
55

66
<ItemGroup>
7-
<PackageReference Update="Microsoft.Extensions.Logging" Version="$(Logging_Extensions_Version)" />
8-
<PackageReference Update="Microsoft.Extensions.Logging.Abstractions" Version="$(Logging_Extensions_Version)" />
9-
<PackageReference Update="Microsoft.Extensions.Logging.Debug" Version="$(Logging_Extensions_Version)" />
7+
<PackageReference Update="Microsoft.Extensions.Logging" Version="2.0.0" />
8+
<PackageReference Update="Microsoft.Extensions.Logging.Abstractions" Version="2.0.0" />
9+
<PackageReference Update="Microsoft.Extensions.Logging.Debug" Version="2.0.0" />
1010
<PackageReference Update="Microsoft.Extensions.DependencyInjection" Version="2.0.0" />
1111
<PackageReference Update="Microsoft.Extensions.DependencyInjection.Abstractions" Version="2.0.0" />
1212
<PackageReference Update="Newtonsoft.Json" Version="11.0.2" />
@@ -22,7 +22,7 @@
2222
<PackageReference Update="XunitXml.TestLogger" Version="2.1.26" />
2323
<PackageReference Update="coverlet.msbuild" Version="2.5.1" />
2424
<PackageReference Update="System.Reactive" Version="4.1.2" />
25-
<PackageReference Update="MediatR" Version="$(MediatR_Version)" />
26-
<PackageReference Update="MediatR.Extensions.Microsoft.DependencyInjection" Version="$(MediatR_Version)" />
25+
<PackageReference Update="MediatR" Version="7.0.0" />
26+
<PackageReference Update="MediatR.Extensions.Microsoft.DependencyInjection" Version="7.0.0" />
2727
</ItemGroup>
2828
</Project>

LSP.sln

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".config", ".config", "{AE4D
2323
build.cake = build.cake
2424
build.ps1 = build.ps1
2525
build.sh = build.sh
26-
Common.Build.props = Common.Build.props
26+
Directory.Build.props = Directory.Build.props
2727
nuget.config = nuget.config
2828
EndProjectSection
2929
EndProject

build.ps1

+1-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ Param(
4242
[ValidateSet("Release", "Debug")]
4343
[string]$Configuration = "Release",
4444
[ValidateSet("Quiet", "Minimal", "Normal", "Verbose", "Diagnostic")]
45-
[string]$Verbosity = "Verbose",
45+
[string]$Verbosity = "Normal",
4646
[Alias("DryRun","Noop")]
4747
[switch]$WhatIf,
4848
[switch]$SkipToolPackageRestore,

build.sh

+29-13
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
##########################################################################
88

99
# Define directories.
10-
SCRIPT_DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
10+
SCRIPT_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
1111
TOOLS_DIR=$SCRIPT_DIR/tools
1212
NUGET_EXE=$TOOLS_DIR/nuget.exe
1313
CAKE_EXE=$TOOLS_DIR/Cake/Cake.exe
@@ -26,29 +26,45 @@ fi
2626
SCRIPT="build.cake"
2727
TARGET="Default"
2828
CONFIGURATION="Release"
29-
VERBOSITY="verbose"
29+
VERBOSITY="normal"
3030
DRYRUN=
3131
SHOW_VERSION=false
3232
SCRIPT_ARGUMENTS=()
3333

3434
# Parse arguments.
3535
for i in "$@"; do
3636
case $1 in
37-
-s|--script) SCRIPT="$2"; shift ;;
38-
-t|--target) TARGET="$2"; shift ;;
39-
-c|--configuration) CONFIGURATION="$2"; shift ;;
40-
-v|--verbosity) VERBOSITY="$2"; shift ;;
41-
-d|--dryrun) DRYRUN="-dryrun" ;;
42-
--version) SHOW_VERSION=true ;;
43-
--) shift; SCRIPT_ARGUMENTS+=("$@"); break ;;
44-
*) SCRIPT_ARGUMENTS+=("$1") ;;
37+
-s | --script)
38+
SCRIPT="$2"
39+
shift
40+
;;
41+
-t | --target)
42+
TARGET="$2"
43+
shift
44+
;;
45+
-c | --configuration)
46+
CONFIGURATION="$2"
47+
shift
48+
;;
49+
-v | --verbosity)
50+
VERBOSITY="$2"
51+
shift
52+
;;
53+
-d | --dryrun) DRYRUN="-dryrun" ;;
54+
--version) SHOW_VERSION=true ;;
55+
--)
56+
shift
57+
SCRIPT_ARGUMENTS+=("$@")
58+
break
59+
;;
60+
*) SCRIPT_ARGUMENTS+=("$1") ;;
4561
esac
4662
shift
4763
done
4864

4965
# Make sure the tools folder exist.
5066
if [ ! -d "$TOOLS_DIR" ]; then
51-
mkdir "$TOOLS_DIR"
67+
mkdir "$TOOLS_DIR"
5268
fi
5369

5470
# Make sure that packages.config exist.
@@ -73,7 +89,7 @@ fi
7389

7490
# Restore tools from NuGet.
7591
pushd "$TOOLS_DIR" >/dev/null
76-
if [ ! -f $PACKAGES_CONFIG_MD5 ] || [ "$( cat $PACKAGES_CONFIG_MD5 | sed 's/\r$//' )" != "$( $MD5_EXE $PACKAGES_CONFIG | awk '{ print $1 }' )" ]; then
92+
if [ ! -f $PACKAGES_CONFIG_MD5 ] || [ "$(cat $PACKAGES_CONFIG_MD5 | sed 's/\r$//')" != "$($MD5_EXE $PACKAGES_CONFIG | awk '{ print $1 }')" ]; then
7793
find . -type d ! -name . | xargs rm -rf
7894
fi
7995

@@ -83,7 +99,7 @@ if [ $? -ne 0 ]; then
8399
exit 1
84100
fi
85101

86-
$MD5_EXE $PACKAGES_CONFIG | awk '{ print $1 }' >| $PACKAGES_CONFIG_MD5
102+
$MD5_EXE $PACKAGES_CONFIG | awk '{ print $1 }' >|$PACKAGES_CONFIG_MD5
87103

88104
popd >/dev/null
89105

sample/SampleServer/SampleServer.csproj

+8-3
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,20 @@
33
<PropertyGroup>
44
<OutputType>Exe</OutputType>
55
<IsPackable>false</IsPackable>
6-
<TargetFramework>netcoreapp2.1</TargetFramework>
6+
<TargetFramework>netcoreapp3.1</TargetFramework>
77
<RuntimeIdentifier>win7-x64</RuntimeIdentifier>
88
</PropertyGroup>
99

1010
<ItemGroup>
1111
<ProjectReference Include="../../src/Server/Server.csproj" />
12-
<PackageReference Include="Microsoft.Extensions.Logging" Version="2.0.0" />
1312
<PackageReference Include="Serilog.Extensions.Logging" Version="3.0.1" />
14-
<PackageReference Include="Serilog.Sinks.File" Version="4.1.0-dev-00850" />
13+
<PackageReference Include="Serilog.Sinks.File" Version="4.1.0" />
14+
<PackageReference Include="System.IO.FileSystem.Primitives" Version="4.3.0" />
15+
<PackageReference Include="System.IO" Version="4.3.0" />
16+
<PackageReference Include="System.Runtime.Handles" Version="4.3.0" />
17+
<PackageReference Include="System.Text.Encoding" Version="4.3.0" />
18+
<PackageReference Include="System.Text.Encoding.Extensions" Version="4.3.0" />
19+
<PackageReference Include="System.Threading.Tasks" Version="4.3.0" />
1520
</ItemGroup>
1621

1722
</Project>

src/Client/Client.csproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFrameworks>netstandard2.0</TargetFrameworks>
4+
<TargetFrameworks>netstandard2.1;netstandard2.0</TargetFrameworks>
55
<PlatformTarget>AnyCPU</PlatformTarget>
66
<AssemblyName>OmniSharp.Extensions.LanguageClient</AssemblyName>
77
<RootNamespace>OmniSharp.Extensions.LanguageServer.Client</RootNamespace>

0 commit comments

Comments
 (0)