Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Roslyn to 4.13.0-3.24620.4 #2642

Merged
merged 18 commits into from
Dec 31, 2024
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 7 additions & 15 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@

name: 'Build'
env:
DotNetVersion: "9.0.100-preview.6.24328.19"
DotNetVersion2: "8.0.303"
DotNetVersion: "9.0.100-rc.1.24452.12"
DotNetVersion2: "8.0.402"
DotNetVersion3: "7.0.410"
DotNetVersion4: "6.0.203" # This is the last version Mono supports. It is used for our Mono CI tests.
NuGetVersion: "6.5.0"
Expand Down Expand Up @@ -36,14 +36,6 @@ jobs:
clean: 'false'
fetch-depth: '0'

# TODO: Need to figure out the correct way to install mono on linux / mac
# Currently the latest image has mono 6.12
# https://github.com/actions/virtual-environments/blob/main/images/linux/Ubuntu1804-README.md
# - name: 🔨 Use Mono ${{ env.MonoVersion }} SDK
# uses: maxim-lobanov/setup-xamarin@v1
# with:
# mono-version: ${{ env.MonoVersion }}

- name: Setup NuGet.exe
uses: nuget/setup-nuget@v1
with:
Expand Down Expand Up @@ -71,39 +63,39 @@ jobs:
dotnet cake --configuration=Release --verbosity=Verbose --target=CI --publish-all --archive

- name: ⬆ Publish Logs
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
continue-on-error: true
if: ${{ always() }}
with:
name: 'logs - ${{ github.workflow }} ${{ matrix.os }}'
path: '${{ env.Artifacts }}/logs/'

- name: ⬆ Publish Packages
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
continue-on-error: true
if: ${{ always() }}
with:
name: 'packages'
path: '${{ env.Artifacts }}/package/'

- name: ⬆ Publish Deployment
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
continue-on-error: true
if: ${{ always() }}
with:
name: 'deployment'
path: '${{ env.Artifacts }}/deployment/'

- name: ⬆ Publish NuGet
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
continue-on-error: true
if: ${{ always() }}
with:
name: 'nuget'
path: '${{ env.Artifacts }}/nuget/'

- name: ⬆ Publish Scripts
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
continue-on-error: true
if: ${{ always() }}
with:
Expand Down
14 changes: 3 additions & 11 deletions .github/workflows/tests-net6.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@

name: 'Tests net6.0'
env:
DotNetVersion: "9.0.100-preview.6.24328.19"
DotNetVersion2: "8.0.303"
DotNetVersion: "9.0.100-rc.1.24452.12"
DotNetVersion2: "8.0.402"
DotNetVersion3: "7.0.410"
DotNetVersion4: "6.0.203" # This is the last version Mono supports. It is used for our Mono CI tests.
NuGetVersion: "6.5.0"
Expand Down Expand Up @@ -39,14 +39,6 @@ jobs:
clean: 'false'
fetch-depth: '0'

# TODO: Need to figure out the correct way to install mono on linux / mac
# Currently the latest image has mono 6.12
# https://github.com/actions/virtual-environments/blob/main/images/linux/Ubuntu1804-README.md
# - name: 🔨 Use Mono ${{ env.MonoVersion }} SDK
# uses: maxim-lobanov/setup-xamarin@v1
# with:
# mono-version: ${{ env.MonoVersion }}

- name: Setup NuGet.exe
uses: nuget/setup-nuget@v1
with:
Expand Down Expand Up @@ -82,7 +74,7 @@ jobs:
TEST_PROJECT: ${{ matrix.testProjects }}

- name: ⬆ Publish Logs
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
continue-on-error: true
if: ${{ always() }}
with:
Expand Down
14 changes: 3 additions & 11 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@

name: 'Tests'
env:
DotNetVersion: "9.0.100-preview.6.24328.19"
DotNetVersion2: "8.0.303"
DotNetVersion: "9.0.100-rc.1.24452.12"
DotNetVersion2: "8.0.402"
DotNetVersion3: "7.0.410"
DotNetVersion4: "6.0.203" # This is the last version Mono supports. It is used for our Mono CI tests.
NuGetVersion: "6.5.0"
Expand Down Expand Up @@ -39,14 +39,6 @@ jobs:
clean: 'false'
fetch-depth: '0'

# TODO: Need to figure out the correct way to install mono on linux / mac
# Currently the latest image has mono 6.12
# https://github.com/actions/virtual-environments/blob/main/images/linux/Ubuntu1804-README.md
# - name: 🔨 Use Mono ${{ env.MonoVersion }} SDK
# uses: maxim-lobanov/setup-xamarin@v1
# with:
# mono-version: ${{ env.MonoVersion }}

- name: Setup NuGet.exe
uses: nuget/setup-nuget@v1
with:
Expand Down Expand Up @@ -82,7 +74,7 @@ jobs:
TEST_PROJECT: ${{ matrix.testProjects }}

- name: ⬆ Publish Logs
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
continue-on-error: true
if: ${{ always() }}
with:
Expand Down
2 changes: 1 addition & 1 deletion .pipelines/init.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
parameters:
# Configuration: Release
Verbosity: Normal
DotNetVersion: "8.0.201"
DotNetVersion: "8.0.402"
CakeVersion: "1.1.0"
NuGetVersion: "5.7.0"
MonoVersion: ""
Expand Down
6 changes: 3 additions & 3 deletions Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
<MicrosoftExtensionPackageVersion>8.0.0</MicrosoftExtensionPackageVersion>
<MicrosoftTestPackageVersion>17.8.0</MicrosoftTestPackageVersion>
<MSBuildPackageVersion>17.3.2</MSBuildPackageVersion>
<NuGetPackageVersion>6.11.0-rc.110</NuGetPackageVersion>
<RoslynPackageVersion>4.12.0-1.24358.3</RoslynPackageVersion>
<NuGetPackageVersion>6.12.0-preview.1.81</NuGetPackageVersion>
<RoslynPackageVersion>4.13.0-1.24477.2</RoslynPackageVersion>
<XunitPackageVersion>2.6.1</XunitPackageVersion>
</PropertyGroup>

Expand All @@ -19,7 +19,7 @@

<PackageVersion Include="Cake.Scripting.Transport" Version="0.15.0" />

<PackageVersion Include="DiffPlex" Version="1.7.1" />
<PackageVersion Include="DiffPlex" Version="1.7.2" />

<PackageVersion Include="Dotnet.Script.DependencyModel" Version="1.5.0" />
<PackageVersion Include="Dotnet.Script.DependencyModel.NuGet" Version="1.5.0" />
Expand Down
2 changes: 1 addition & 1 deletion azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ resources:

variables:
Verbosity: Diagnostic
DotNetVersion: "8.0.303"
DotNetVersion: "8.0.402"
CakeVersion: "3.0.0"
NuGetVersion: "6.5.0"
GitVersionVersion: "5.0.1"
Expand Down
4 changes: 2 additions & 2 deletions build.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
"DotNetVersions": [
"6.0.203",
"7.0.410",
"8.0.303",
"9.0.100-preview.6.24328.19"
"8.0.402",
"9.0.100-rc.1.24452.12"
],
"RequiredMonoVersion": "6.6.0",
"DownloadURL": "https://roslynomnisharp.blob.core.windows.net/ext",
Expand Down
2 changes: 1 addition & 1 deletion global.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"sdk": {
"version": "8.0.303",
"version": "8.0.402",
"rollForward": "latestMinor"
}
}
2 changes: 1 addition & 1 deletion src/OmniSharp.Abstractions/Configuration.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ internal static class Configuration
{
public static bool ZeroBasedIndices = false;

public const string RoslynVersion = "4.12.0.0";
public const string RoslynVersion = "4.13.0.0";
public const string RoslynPublicKeyToken = "31bf3856ad364e35";

public readonly static string RoslynFeatures = GetRoslynAssemblyFullName("Microsoft.CodeAnalysis.Features");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ namespace OmniSharp.Roslyn.Utilities
{
public static class ShadowCopyAnalyzerAssemblyLoader
{
public static readonly IAnalyzerAssemblyLoader Instance = OmnisharpAnalyzerAssemblyLoaderFactory.CreateShadowCopyAnalyzerAssemblyLoader();
public static readonly IAnalyzerAssemblyLoader Instance = CreateShadowCopyLoader();

public static IAnalyzerAssemblyLoader CreateShadowCopyLoader() => OmnisharpAnalyzerAssemblyLoaderFactory.CreateShadowCopyAnalyzerAssemblyLoader();
}
}
4 changes: 2 additions & 2 deletions test-assets/test-projects/Net80Project/global.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"sdk": {
"version": "8.0.303"
"version": "8.0.402"
}
}
}
4 changes: 2 additions & 2 deletions test-assets/test-projects/Net90Project/global.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"sdk": {
"version": "9.0.100-preview.6.24328.19"
"version": "9.0.100-rc.1.24452.12"
}
}
}
4 changes: 1 addition & 3 deletions tests/OmniSharp.MSBuild.Tests/AbstractMSBuildTestFixture.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,11 @@ public abstract class AbstractMSBuildTestFixture : AbstractTestFixture, IDisposa
{
private readonly IAssemblyLoader _assemblyLoader;
private readonly IMSBuildLocator _msbuildLocator;
private readonly IAnalyzerAssemblyLoader _analyzerAssemblyLoader;

public AbstractMSBuildTestFixture(ITestOutputHelper output)
: base(output)
{
_assemblyLoader = new AssemblyLoader(this.LoggerFactory);
_analyzerAssemblyLoader = ShadowCopyAnalyzerAssemblyLoader.Instance;

// Since we can only load MSBuild once into our process we need to include
// prerelease version so that our .NET 7 tests will pass.
Expand All @@ -47,7 +45,7 @@ protected OmniSharpTestHost CreateMSBuildTestHost(string path, IEnumerable<Expor
IConfiguration configurationData = null)
{
var environment = new OmniSharpEnvironment(path, logLevel: LogLevel.Trace);
var serviceProvider = TestServiceProvider.Create(this.TestOutput, environment, this.LoggerFactory, _assemblyLoader, _analyzerAssemblyLoader, _msbuildLocator,
var serviceProvider = TestServiceProvider.Create(this.TestOutput, environment, this.LoggerFactory, _assemblyLoader, ShadowCopyAnalyzerAssemblyLoader.CreateShadowCopyLoader(), _msbuildLocator,
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can no longer use one assembly loader for all the test runs because it now gets disposed with the other test services. See dotnet/roslyn#74845

configurationData);

return OmniSharpTestHost.Create(serviceProvider, additionalExports);
Expand Down
4 changes: 2 additions & 2 deletions tests/OmniSharp.MSBuild.Tests/ProjectLoadListenerTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ 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.303"), emitter.ReceivedMessages[0].SdkVersion);
Assert.Equal(GetHashedFileExtension("8.0.402"), emitter.ReceivedMessages[0].SdkVersion);
}

[ConditionalFact(typeof(DotnetRuntimeOnly))]
Expand All @@ -255,7 +255,7 @@ public async Task The_correct_sdk_version_is_emitted_NET9()
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.6.24328.19"), emitter.ReceivedMessages[0].SdkVersion);
Assert.Equal(GetHashedFileExtension("9.0.100-rc.1.24452.12"), emitter.ReceivedMessages[0].SdkVersion);
}

private string GetHashedFileExtension(string fileExtension)
Expand Down
2 changes: 1 addition & 1 deletion tests/OmniSharp.Roslyn.CSharp.Tests/ImplementTypeFacts.cs
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ private async Task VerifyImplementType(string code, string expectedChange, Dicti
Column = point.Offset,
FileName = testFile.FileName,
Buffer = testFile.Content.Code,
Identifier = "False;False;True:global::IFoo;AssemblyName;Microsoft.CodeAnalysis.ImplementInterface.AbstractImplementInterfaceService+ImplementInterfaceCodeAction;",
Identifier = "False;False;True:global::IFoo;Microsoft.CodeAnalysis.ImplementInterface.AbstractImplementInterfaceService+ImplementInterfaceCodeAction;",
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Assembly Name removed in dotnet/roslyn@9c8c21f

WantsTextChanges = true,
WantsAllCodeActionOperations = true
};
Expand Down
2 changes: 1 addition & 1 deletion tests/OmniSharp.Tests/DotNetCliServiceFacts.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ namespace OmniSharp.Tests
{
public class DotNetCliServiceFacts : AbstractTestFixture
{
private const string DotNetVersion = "8.0.303";
private const string DotNetVersion = "8.0.402";
private int Major { get; }
private int Minor { get; }
private int Patch { get; }
Expand Down
2 changes: 1 addition & 1 deletion tests/TestUtility/TestServiceProvider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ public static IServiceProvider Create(
var configuration = CreateConfiguration(configurationData);
var msbuildLocator = CreateMSBuildLocator(loggerFactory, assemblyLoader, configurationData);
var sharedTextWriter = CreateSharedTextWriter(testOutput);
var analyzerAssemblyLoader = ShadowCopyAnalyzerAssemblyLoader.Instance;
var analyzerAssemblyLoader = ShadowCopyAnalyzerAssemblyLoader.CreateShadowCopyLoader();
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Another case where tests cannot share the same assembly loader.


return new TestServiceProvider(
environment, loggerFactory, assemblyLoader, analyzerAssemblyLoader, sharedTextWriter,
Expand Down
Loading