Skip to content

Commit

Permalink
Merge pull request #2603 from OmniSharp/joerobich/update-sdks-roslyn
Browse files Browse the repository at this point in the history
Update SDKs and Roslyn
  • Loading branch information
JoeRobich committed Feb 17, 2024
2 parents 41dbf7c + 70c8064 commit 8495e47
Show file tree
Hide file tree
Showing 32 changed files with 128 additions and 59 deletions.
8 changes: 5 additions & 3 deletions .github/workflows/build.yml
@@ -1,9 +1,10 @@

name: 'Build'
env:
DotNetVersion: "8.0.100"
DotNetVersion2: "7.0.404"
DotNetVersion3: "6.0.203" # This is the last version Mono supports. It is used for our Mono CI tests.
DotNetVersion: "9.0.100-preview.1.24101.2"
DotNetVersion2: "8.0.201"
DotNetVersion3: "7.0.406"
DotNetVersion4: "6.0.203" # This is the last version Mono supports. It is used for our Mono CI tests.
NuGetVersion: "6.5.0"
MonoVersion: "6.12.0"
Artifacts: ${{ github.workspace }}/artifacts/
Expand Down Expand Up @@ -52,6 +53,7 @@ jobs:
uses: actions/setup-dotnet@v3
with:
dotnet-version: |
${{ env.DotNetVersion4 }}
${{ env.DotNetVersion3 }}
${{ env.DotNetVersion2 }}
${{ env.DotNetVersion }}
Expand Down
8 changes: 5 additions & 3 deletions .github/workflows/tests-net6.yml
@@ -1,9 +1,10 @@

name: 'Tests net6.0'
env:
DotNetVersion: "8.0.100"
DotNetVersion2: "7.0.404"
DotNetVersion3: "6.0.203" # This is the last version Mono supports. It is used for our Mono CI tests.
DotNetVersion: "9.0.100-preview.1.24101.2"
DotNetVersion2: "8.0.201"
DotNetVersion3: "7.0.406"
DotNetVersion4: "6.0.203" # This is the last version Mono supports. It is used for our Mono CI tests.
NuGetVersion: "6.5.0"
MonoVersion: "6.12.0"
Artifacts: ${{ github.workspace }}/artifacts/
Expand Down Expand Up @@ -55,6 +56,7 @@ jobs:
uses: actions/setup-dotnet@v3
with:
dotnet-version: |
${{ env.DotNetVersion4 }}
${{ env.DotNetVersion3 }}
${{ env.DotNetVersion2 }}
${{ env.DotNetVersion }}
Expand Down
8 changes: 5 additions & 3 deletions .github/workflows/tests.yml
@@ -1,9 +1,10 @@

name: 'Tests'
env:
DotNetVersion: "8.0.100"
DotNetVersion2: "7.0.404"
DotNetVersion3: "6.0.203" # This is the last version Mono supports. It is used for our Mono CI tests.
DotNetVersion: "9.0.100-preview.1.24101.2"
DotNetVersion2: "8.0.201"
DotNetVersion3: "7.0.406"
DotNetVersion4: "6.0.203" # This is the last version Mono supports. It is used for our Mono CI tests.
NuGetVersion: "6.5.0"
MonoVersion: "6.12.0"
Artifacts: ${{ github.workspace }}/artifacts/
Expand Down Expand Up @@ -55,6 +56,7 @@ jobs:
uses: actions/setup-dotnet@v3
with:
dotnet-version: |
${{ env.DotNetVersion4 }}
${{ env.DotNetVersion3 }}
${{ env.DotNetVersion2 }}
${{ env.DotNetVersion }}
Expand Down
12 changes: 9 additions & 3 deletions .pipelines/init.yml
@@ -1,9 +1,10 @@
parameters:
# Configuration: Release
Verbosity: Normal
DotNetVersion: "8.0.100"
DotNetVersion2: "7.0.404"
DotNetVersion3: "6.0.203" # This is the last version Mono supports. It is used for our Mono CI tests.
DotNetVersion: "9.0.100-preview.1.24101.2"
DotNetVersion2: "8.0.201"
DotNetVersion3: "7.0.406"
DotNetVersion4: "6.0.203" # This is the last version Mono supports. It is used for our Mono CI tests.
CakeVersion: "1.1.0"
NuGetVersion: "5.7.0"
MonoVersion: ''
Expand Down Expand Up @@ -35,6 +36,11 @@ steps:
inputs:
packageType: 'sdk'
version: ${{ parameters.DotNetVersion3 }}
- task: UseDotNet@2
displayName: Install dotnet $(DotNetVersion4)
inputs:
packageType: 'sdk'
version: ${{ parameters.DotNetVersion4 }}
- task: DotNetCoreCLI@2
displayName: 'dotnet install cake'
inputs:
Expand Down
3 changes: 3 additions & 0 deletions CHANGELOG.md
@@ -1,6 +1,9 @@
# Changelog
All changes to the project will be documented in this file.

## [1.39.12] - Not Released
* Update SDKs and Roslyn ([#2603](https://github.com/OmniSharp/omnisharp-roslyn/pull/2603))

## [1.39.11] - 2023-12-19
* Update changelog (PR: [#2591](https://github.com/OmniSharp/omnisharp-roslyn/pull/2591))
* Update Readme text and fix broken link. ([#2581](https://github.com/OmniSharp/omnisharp-roslyn/issues/2581), PR: [#2582](https://github.com/OmniSharp/omnisharp-roslyn/pull/2582))
Expand Down
7 changes: 3 additions & 4 deletions Directory.Packages.props
Expand Up @@ -8,8 +8,8 @@
<MicrosoftExtensionPackageVersion>8.0.0</MicrosoftExtensionPackageVersion>
<MicrosoftTestPackageVersion>17.8.0</MicrosoftTestPackageVersion>
<MSBuildPackageVersion>17.3.2</MSBuildPackageVersion>
<NuGetPackageVersion>6.8.0-rc.122</NuGetPackageVersion>
<RoslynPackageVersion>4.9.0-3.23611.3</RoslynPackageVersion>
<NuGetPackageVersion>6.10.0-preview.1.18</NuGetPackageVersion>
<RoslynPackageVersion>4.10.0-2.24112.8</RoslynPackageVersion>
<XunitPackageVersion>2.6.1</XunitPackageVersion>
</PropertyGroup>

Expand Down Expand Up @@ -42,7 +42,6 @@
<PackageVersion Include="Microsoft.CodeAnalysis.ExternalAccess.AspNetCore" Version="$(RoslynPackageVersion)" />
<PackageVersion Include="Microsoft.CodeAnalysis.ExternalAccess.OmniSharp" Version="$(RoslynPackageVersion)" />
<PackageVersion Include="Microsoft.CodeAnalysis.ExternalAccess.OmniSharp.CSharp" Version="$(RoslynPackageVersion)" />
<PackageVersion Include="Microsoft.CodeAnalysis.ExternalAccess.RazorCompiler" Version="$(RoslynPackageVersion)" />

<PackageVersion Include="Microsoft.Extensions.Caching.Memory" Version="$(MicrosoftExtensionPackageVersion)" />
<PackageVersion Include="Microsoft.Extensions.Configuration" Version="$(MicrosoftExtensionPackageVersion)" />
Expand Down Expand Up @@ -82,7 +81,7 @@
<PackageVersion Include="OmniSharp.Extensions.LanguageProtocol.Testing" Version="$(OmniSharpExtensionsPackageVersion)" />
<PackageVersion Include="OmniSharp.Extensions.JsonRpc" Version="$(OmniSharpExtensionsPackageVersion)" />

<PackageVersion Include="SQLitePCLRaw.bundle_green" Version="2.1.0" />
<PackageVersion Include="SQLitePCLRaw.bundle_green" Version="2.1.8" />

<PackageVersion Include="System.Collections.Immutable" Version="8.0.0" />
<PackageVersion Include="System.ComponentModel.Composition" Version="8.0.0" />
Expand Down
2 changes: 1 addition & 1 deletion azure-pipelines.yml
Expand Up @@ -32,7 +32,7 @@ resources:

variables:
Verbosity: Diagnostic
DotNetVersion: "8.0.100"
DotNetVersion: "8.0.201"
CakeVersion: "3.0.0"
NuGetVersion: "6.5.0"
GitVersionVersion: "5.0.1"
Expand Down
22 changes: 7 additions & 15 deletions build.cake
Expand Up @@ -159,24 +159,18 @@ Task("PrepareTestAssets:CommonTestAssets")
{
DotNetBuild(folder, new DotNetBuildSettings()
{
ToolPath = env.DotNetCommand,
WorkingDirectory = folder,
Verbosity = DotNetVerbosity.Minimal
Verbosity = DotNetVerbosity.Minimal,
});
}
catch
catch when (project == "ExternAlias")
{
// ExternalAlias has issues once in a while, try building again to get it working.
if (project == "ExternAlias")
DotNetBuild(folder, new DotNetBuildSettings()
{
DotNetBuild(folder, new DotNetBuildSettings()
{
ToolPath = env.DotNetCommand,
WorkingDirectory = folder,
Verbosity = DotNetVerbosity.Minimal
});
}
WorkingDirectory = folder,
Verbosity = DotNetVerbosity.Minimal
});
}
});

Expand All @@ -190,7 +184,6 @@ Task("PrepareTestAssets:RestoreOnlyTestAssets")
DotNetRestore(new DotNetRestoreSettings()
{
ToolPath = env.DotNetCommand,
WorkingDirectory = folder,
Verbosity = DotNetVerbosity.Minimal
});
Expand All @@ -207,7 +200,6 @@ Task("PrepareTestAssets:WindowsOnlyTestAssets")
DotNetBuild(folder, new DotNetBuildSettings()
{
ToolPath = env.DotNetCommand,
WorkingDirectory = folder,
Verbosity = DotNetVerbosity.Minimal
});
Expand Down Expand Up @@ -302,7 +294,7 @@ Task("Test")
.IsDependentOn("PrepareTestAssets")
.Does(() =>
{
var testTargetFramework = useDotNetTest ? "net7.0" : "net472";
var testTargetFramework = useDotNetTest ? "net8.0" : "net472";
var testProjects = string.IsNullOrEmpty(testProjectArgument) ? buildPlan.TestProjects : testProjectArgument.Split(',');
foreach (var testProject in testProjects)
{
Expand Down
5 changes: 3 additions & 2 deletions build.json
Expand Up @@ -3,8 +3,9 @@
"DotNetChannel": "Preview",
"DotNetVersions": [
"6.0.203",
"7.0.404",
"8.0.100"
"7.0.406",
"8.0.201",
"9.0.100-preview.1.24101.2"
],
"RequiredMonoVersion": "6.6.0",
"DownloadURL": "https://roslynomnisharp.blob.core.windows.net/ext",
Expand Down
4 changes: 2 additions & 2 deletions global.json
@@ -1,6 +1,6 @@
{
"sdk": {
"version": "8.0.100",
"version": "8.0.201",
"rollForward": "latestMinor"
}
}
}
2 changes: 1 addition & 1 deletion src/OmniSharp.Abstractions/Configuration.cs
Expand Up @@ -4,7 +4,7 @@ internal static class Configuration
{
public static bool ZeroBasedIndices = false;

public const string RoslynVersion = "4.9.0.0";
public const string RoslynVersion = "4.10.0.0";
public const string RoslynPublicKeyToken = "31bf3856ad364e35";

public readonly static string RoslynFeatures = GetRoslynAssemblyFullName("Microsoft.CodeAnalysis.Features");
Expand Down
Expand Up @@ -227,7 +227,7 @@ private IEnumerable<AvailableCodeAction> ConvertToAvailableCodeAction(IEnumerabl
{
return actions.SelectMany(action =>
{
var nestedActions = action.CodeAction.GetNestedCodeActions();
var nestedActions = action.CodeAction.NestedActions;
if (!nestedActions.IsDefaultOrEmpty)
{
return nestedActions.Select(nestedAction => new AvailableCodeAction(nestedAction, action.CodeActionKind, action.CodeAction));
Expand Down
3 changes: 0 additions & 3 deletions src/OmniSharp.Roslyn/OmniSharp.Roslyn.csproj
Expand Up @@ -21,9 +21,6 @@
</ItemGroup>

<ItemGroup>
<!-- Not directly referenced but needed for Razor source generators -->
<PackageReference Include="Microsoft.CodeAnalysis.ExternalAccess.RazorCompiler" ReferenceOutputAssembly="false" />

<!-- Not directly referenced but needed for Route embedded language features -->
<PackageReference Include="Microsoft.CodeAnalysis.ExternalAccess.AspNetCore" ReferenceOutputAssembly="false" />
</ItemGroup>
Expand Down
4 changes: 2 additions & 2 deletions test-assets/test-projects/Net70Project/global.json
@@ -1,5 +1,5 @@
{
"sdk": {
"version": "7.0.404"
"version": "7.0.406"
}
}
}
4 changes: 2 additions & 2 deletions test-assets/test-projects/Net80Project/global.json
@@ -1,5 +1,5 @@
{
"sdk": {
"version": "8.0.100"
"version": "8.0.201"
}
}
}
8 changes: 8 additions & 0 deletions test-assets/test-projects/Net90Project/Net90Project.csproj
@@ -0,0 +1,8 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net9.0</TargetFramework>
</PropertyGroup>

</Project>
12 changes: 12 additions & 0 deletions test-assets/test-projects/Net90Project/Program.cs
@@ -0,0 +1,12 @@
using System;

namespace ProjectAndSolution
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine("Hello World!");
}
}
}
5 changes: 5 additions & 0 deletions test-assets/test-projects/Net90Project/global.json
@@ -0,0 +1,5 @@
{
"sdk": {
"version": "9.0.100-preview.1.24101.2"
}
}
2 changes: 1 addition & 1 deletion tests/OmniSharp.Cake.Tests/OmniSharp.Cake.Tests.csproj
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net7.0;net472</TargetFrameworks>
<TargetFrameworks>net8.0;net472</TargetFrameworks>
<PlatformTarget>AnyCPU</PlatformTarget>
<GenerateRuntimeConfigurationFiles>true</GenerateRuntimeConfigurationFiles>
</PropertyGroup>
Expand Down
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net7.0;net472</TargetFrameworks>
<TargetFrameworks>net8.0;net472</TargetFrameworks>
<PlatformTarget>AnyCPU</PlatformTarget>
<GenerateRuntimeConfigurationFiles>true</GenerateRuntimeConfigurationFiles>
</PropertyGroup>
Expand Down
2 changes: 1 addition & 1 deletion tests/OmniSharp.Http.Tests/OmniSharp.Http.Tests.csproj
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net7.0;net472</TargetFrameworks>
<TargetFrameworks>net8.0;net472</TargetFrameworks>
<PlatformTarget>AnyCPU</PlatformTarget>
<GenerateRuntimeConfigurationFiles>true</GenerateRuntimeConfigurationFiles>
</PropertyGroup>
Expand Down
2 changes: 1 addition & 1 deletion tests/OmniSharp.Lsp.Tests/OmniSharp.Lsp.Tests.csproj
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net7.0;net472</TargetFrameworks>
<TargetFrameworks>net8.0;net472</TargetFrameworks>
<PlatformTarget>AnyCPU</PlatformTarget>
<GenerateRuntimeConfigurationFiles>true</GenerateRuntimeConfigurationFiles>
</PropertyGroup>
Expand Down
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net7.0;net472</TargetFrameworks>
<TargetFrameworks>net8.0;net472</TargetFrameworks>
<PlatformTarget>AnyCPU</PlatformTarget>
<GenerateRuntimeConfigurationFiles>true</GenerateRuntimeConfigurationFiles>
</PropertyGroup>
Expand Down
16 changes: 14 additions & 2 deletions tests/OmniSharp.MSBuild.Tests/ProjectLoadListenerTests.cs
Expand Up @@ -231,7 +231,7 @@ public async Task The_correct_sdk_version_is_emitted_NET7()
using var testProject = await TestAssets.Instance.GetTestProjectAsync("Net70Project");
using var host = CreateMSBuildTestHost(testProject.Directory, emitter.AsExportDescriptionProvider(LoggerFactory));
Assert.Single(emitter.ReceivedMessages);
Assert.Equal(GetHashedFileExtension("7.0.404"), emitter.ReceivedMessages[0].SdkVersion);
Assert.Equal(GetHashedFileExtension("7.0.406"), emitter.ReceivedMessages[0].SdkVersion);
}

[ConditionalFact(typeof(DotnetRuntimeOnly))]
Expand All @@ -243,7 +243,19 @@ public async Task The_correct_sdk_version_is_emitted_NET8()
using var testProject = await TestAssets.Instance.GetTestProjectAsync("Net80Project");
using var host = CreateMSBuildTestHost(testProject.Directory, emitter.AsExportDescriptionProvider(LoggerFactory));
Assert.Single(emitter.ReceivedMessages);
Assert.Equal(GetHashedFileExtension("8.0.100"), emitter.ReceivedMessages[0].SdkVersion);
Assert.Equal(GetHashedFileExtension("8.0.201"), emitter.ReceivedMessages[0].SdkVersion);
}

[ConditionalFact(typeof(DotnetRuntimeOnly))]
public async Task The_correct_sdk_version_is_emitted_NET9()
{
// Arrange
var emitter = new ProjectLoadTestEventEmitter();

using var testProject = await TestAssets.Instance.GetTestProjectAsync("Net90Project");
using var host = CreateMSBuildTestHost(testProject.Directory, emitter.AsExportDescriptionProvider(LoggerFactory));
Assert.Single(emitter.ReceivedMessages);
Assert.Equal(GetHashedFileExtension("9.0.100-preview.1.24101.2"), emitter.ReceivedMessages[0].SdkVersion);
}

private string GetHashedFileExtension(string fileExtension)
Expand Down

0 comments on commit 8495e47

Please sign in to comment.