Skip to content

Commit

Permalink
Merge pull request #206 from OmniSharp/feature/config
Browse files Browse the repository at this point in the history
Added OnStarted delegate handler that is called after the server has successfully started +semver:minor
  • Loading branch information
david-driscoll authored Jan 31, 2020
2 parents d26c4dd + e6652ed commit c4fbf34
Show file tree
Hide file tree
Showing 51 changed files with 278 additions and 202 deletions.
2 changes: 1 addition & 1 deletion .appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
image: Visual Studio 2017
image: Visual Studio 2019
environment:
nuget_org_apikey:
secure: lFaEHVRMsSWTveDH/DuLl4+hv+O0i4qLkbhW3aCgzq0oCrOuV+0TSEkqe6aiHuNX
Expand Down
33 changes: 17 additions & 16 deletions .azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ resources:
variables:
Configuration: Release
Verbosity: Normal
DotNetVersion: "2.2.101"
DotNetVersion: "3.1.101"
CakeVersion: "0.32.1"
NuGetVersion: "4.9.2"
NuGetVersion: "5.4.0"
Coverage: "$(Agent.BuildDirectory)/c"
VstsCoverage: "$(Coverage)"
Artifacts: $(Build.ArtifactStagingDirectory)
Expand All @@ -32,7 +32,7 @@ variables:
jobs:
- job: GitVersion
pool:
vmImage: "VS2017-Win2016"
vmImage: "windows-latest"
steps:
- template: gitversion/store.yml@rsg
parameters:
Expand All @@ -52,24 +52,25 @@ jobs:
# NuGetVersion: $(NuGetVersion)
# Script: build.cake

- template: pipeline/cake-job.yml@rsg
parameters:
name: 'Linux'
dependsOn: GitVersion
vmImage: "Ubuntu-16.04"
pushNuget: false
Configuration: $(Configuration)
Verbosity: $(Verbosity)
CakeVersion: $(CakeVersion)
DotNetVersion: $(DotNetVersion)
NuGetVersion: $(NuGetVersion)
Script: build.cake
# Disabled temporarily as the template does not support multiple runtimes
# - template: pipeline/cake-job.yml@rsg
# parameters:
# name: 'Linux'
# dependsOn: GitVersion
# vmImage: "ubuntu-latest"
# pushNuget: false
# Configuration: $(Configuration)
# Verbosity: $(Verbosity)
# CakeVersion: $(CakeVersion)
# DotNetVersion: $(DotNetVersion)
# NuGetVersion: $(NuGetVersion)
# Script: build.cake

- template: pipeline/cake-job.yml@rsg
parameters:
name: 'Windows'
dependsOn: GitVersion
vmImage: "VS2017-Win2016"
vmImage: "windows-latest"
pushNuget: true
Configuration: $(Configuration)
Verbosity: $(Verbosity)
Expand Down
4 changes: 1 addition & 3 deletions Common.Build.props → Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,14 @@
<Company>OmniSharp</Company>
<Copyright>Copyright OmniSharp and contributors © 2018</Copyright>
<Authors>David Driscoll</Authors>
<LangVersion>latest</LangVersion>
<LangVersion>8</LangVersion>
<SignAssembly>true</SignAssembly>
<DelaySign>false</DelaySign>
<PackageLicenseUrl>https://github.com/OmniSharp/csharp-language-server-protocol/blob/master/LICENSE</PackageLicenseUrl>
<PackageIconUrl>http://www.omnisharp.net/images/logo.png</PackageIconUrl>
<PackageProjectUrl>https://github.com/OmniSharp/csharp-language-server-protocol</PackageProjectUrl>
<PackageTags>lsp;language server;language server protocol;language client;language server client</PackageTags>
<AssemblyOriginatorKeyFile>$(MSBuildThisFileDirectory)\lsp.snk</AssemblyOriginatorKeyFile>
<Logging_Extensions_Version>2.0.0</Logging_Extensions_Version>
<MediatR_Version>7.0.0</MediatR_Version>
</PropertyGroup>
<PropertyGroup>
<EmbedUntrackedSources>true</EmbedUntrackedSources>
Expand Down
12 changes: 6 additions & 6 deletions Common.Build.targets → Directory.Build.targets
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<Project>
<ItemGroup>
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0-beta2-18618-05" PrivateAssets="All" />
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0" PrivateAssets="All" />
</ItemGroup>

<ItemGroup>
<PackageReference Update="Microsoft.Extensions.Logging" Version="$(Logging_Extensions_Version)" />
<PackageReference Update="Microsoft.Extensions.Logging.Abstractions" Version="$(Logging_Extensions_Version)" />
<PackageReference Update="Microsoft.Extensions.Logging.Debug" Version="$(Logging_Extensions_Version)" />
<PackageReference Update="Microsoft.Extensions.Logging" Version="2.0.0" />
<PackageReference Update="Microsoft.Extensions.Logging.Abstractions" Version="2.0.0" />
<PackageReference Update="Microsoft.Extensions.Logging.Debug" Version="2.0.0" />
<PackageReference Update="Microsoft.Extensions.DependencyInjection" Version="2.0.0" />
<PackageReference Update="Microsoft.Extensions.DependencyInjection.Abstractions" Version="2.0.0" />
<PackageReference Update="Newtonsoft.Json" Version="11.0.2" />
Expand All @@ -22,7 +22,7 @@
<PackageReference Update="XunitXml.TestLogger" Version="2.1.26" />
<PackageReference Update="coverlet.msbuild" Version="2.5.1" />
<PackageReference Update="System.Reactive" Version="4.1.2" />
<PackageReference Update="MediatR" Version="$(MediatR_Version)" />
<PackageReference Update="MediatR.Extensions.Microsoft.DependencyInjection" Version="$(MediatR_Version)" />
<PackageReference Update="MediatR" Version="7.0.0" />
<PackageReference Update="MediatR.Extensions.Microsoft.DependencyInjection" Version="7.0.0" />
</ItemGroup>
</Project>
2 changes: 1 addition & 1 deletion LSP.sln
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".config", ".config", "{AE4D
build.cake = build.cake
build.ps1 = build.ps1
build.sh = build.sh
Common.Build.props = Common.Build.props
Directory.Build.props = Directory.Build.props
nuget.config = nuget.config
EndProjectSection
EndProject
Expand Down
2 changes: 1 addition & 1 deletion build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ Param(
[ValidateSet("Release", "Debug")]
[string]$Configuration = "Release",
[ValidateSet("Quiet", "Minimal", "Normal", "Verbose", "Diagnostic")]
[string]$Verbosity = "Verbose",
[string]$Verbosity = "Normal",
[Alias("DryRun","Noop")]
[switch]$WhatIf,
[switch]$SkipToolPackageRestore,
Expand Down
42 changes: 29 additions & 13 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
##########################################################################

# Define directories.
SCRIPT_DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
SCRIPT_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
TOOLS_DIR=$SCRIPT_DIR/tools
NUGET_EXE=$TOOLS_DIR/nuget.exe
CAKE_EXE=$TOOLS_DIR/Cake/Cake.exe
Expand All @@ -26,29 +26,45 @@ fi
SCRIPT="build.cake"
TARGET="Default"
CONFIGURATION="Release"
VERBOSITY="verbose"
VERBOSITY="normal"
DRYRUN=
SHOW_VERSION=false
SCRIPT_ARGUMENTS=()

# Parse arguments.
for i in "$@"; do
case $1 in
-s|--script) SCRIPT="$2"; shift ;;
-t|--target) TARGET="$2"; shift ;;
-c|--configuration) CONFIGURATION="$2"; shift ;;
-v|--verbosity) VERBOSITY="$2"; shift ;;
-d|--dryrun) DRYRUN="-dryrun" ;;
--version) SHOW_VERSION=true ;;
--) shift; SCRIPT_ARGUMENTS+=("$@"); break ;;
*) SCRIPT_ARGUMENTS+=("$1") ;;
-s | --script)
SCRIPT="$2"
shift
;;
-t | --target)
TARGET="$2"
shift
;;
-c | --configuration)
CONFIGURATION="$2"
shift
;;
-v | --verbosity)
VERBOSITY="$2"
shift
;;
-d | --dryrun) DRYRUN="-dryrun" ;;
--version) SHOW_VERSION=true ;;
--)
shift
SCRIPT_ARGUMENTS+=("$@")
break
;;
*) SCRIPT_ARGUMENTS+=("$1") ;;
esac
shift
done

# Make sure the tools folder exist.
if [ ! -d "$TOOLS_DIR" ]; then
mkdir "$TOOLS_DIR"
mkdir "$TOOLS_DIR"
fi

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

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

Expand All @@ -83,7 +99,7 @@ if [ $? -ne 0 ]; then
exit 1
fi

$MD5_EXE $PACKAGES_CONFIG | awk '{ print $1 }' >| $PACKAGES_CONFIG_MD5
$MD5_EXE $PACKAGES_CONFIG | awk '{ print $1 }' >|$PACKAGES_CONFIG_MD5

popd >/dev/null

Expand Down
11 changes: 8 additions & 3 deletions sample/SampleServer/SampleServer.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,20 @@
<PropertyGroup>
<OutputType>Exe</OutputType>
<IsPackable>false</IsPackable>
<TargetFramework>netcoreapp2.1</TargetFramework>
<TargetFramework>netcoreapp3.1</TargetFramework>
<RuntimeIdentifier>win7-x64</RuntimeIdentifier>
</PropertyGroup>

<ItemGroup>
<ProjectReference Include="../../src/Server/Server.csproj" />
<PackageReference Include="Microsoft.Extensions.Logging" Version="2.0.0" />
<PackageReference Include="Serilog.Extensions.Logging" Version="3.0.1" />
<PackageReference Include="Serilog.Sinks.File" Version="4.1.0-dev-00850" />
<PackageReference Include="Serilog.Sinks.File" Version="4.1.0" />
<PackageReference Include="System.IO.FileSystem.Primitives" Version="4.3.0" />
<PackageReference Include="System.IO" Version="4.3.0" />
<PackageReference Include="System.Runtime.Handles" Version="4.3.0" />
<PackageReference Include="System.Text.Encoding" Version="4.3.0" />
<PackageReference Include="System.Text.Encoding.Extensions" Version="4.3.0" />
<PackageReference Include="System.Threading.Tasks" Version="4.3.0" />
</ItemGroup>

</Project>
2 changes: 1 addition & 1 deletion src/Client/Client.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>netstandard2.0</TargetFrameworks>
<TargetFrameworks>netstandard2.1;netstandard2.0</TargetFrameworks>
<PlatformTarget>AnyCPU</PlatformTarget>
<AssemblyName>OmniSharp.Extensions.LanguageClient</AssemblyName>
<RootNamespace>OmniSharp.Extensions.LanguageServer.Client</RootNamespace>
Expand Down
Loading

0 comments on commit c4fbf34

Please sign in to comment.