From 6b42fb7d93991251a1ae7695dddb82621f19aef8 Mon Sep 17 00:00:00 2001 From: filipw Date: Wed, 31 Jul 2019 17:29:55 +0200 Subject: [PATCH 1/7] renamed NullableContextOptions to Nullable --- .../ProjectFile/ProjectFileInfo.ProjectData.cs | 4 ++-- src/OmniSharp.MSBuild/ProjectFile/PropertyNames.cs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/OmniSharp.MSBuild/ProjectFile/ProjectFileInfo.ProjectData.cs b/src/OmniSharp.MSBuild/ProjectFile/ProjectFileInfo.ProjectData.cs index 585622530c..a8fd5360b1 100644 --- a/src/OmniSharp.MSBuild/ProjectFile/ProjectFileInfo.ProjectData.cs +++ b/src/OmniSharp.MSBuild/ProjectFile/ProjectFileInfo.ProjectData.cs @@ -179,7 +179,7 @@ public static ProjectData Create(MSB.Evaluation.Project project) var languageVersion = PropertyConverter.ToLanguageVersion(project.GetPropertyValue(PropertyNames.LangVersion)); var allowUnsafeCode = PropertyConverter.ToBoolean(project.GetPropertyValue(PropertyNames.AllowUnsafeBlocks), defaultValue: false); var outputKind = PropertyConverter.ToOutputKind(project.GetPropertyValue(PropertyNames.OutputType)); - var nullableContextOptions = PropertyConverter.ToNullableContextOptions(project.GetPropertyValue(PropertyNames.NullableContextOptions)); + var nullableContextOptions = PropertyConverter.ToNullableContextOptions(project.GetPropertyValue(PropertyNames.Nullable)); var documentationFile = project.GetPropertyValue(PropertyNames.DocumentationFile); var preprocessorSymbolNames = PropertyConverter.ToPreprocessorSymbolNames(project.GetPropertyValue(PropertyNames.DefineConstants)); var suppressedDiagnosticIds = PropertyConverter.ToSuppressedDiagnosticIds(project.GetPropertyValue(PropertyNames.NoWarn)); @@ -218,7 +218,7 @@ public static ProjectData Create(MSB.Execution.ProjectInstance projectInstance) var languageVersion = PropertyConverter.ToLanguageVersion(projectInstance.GetPropertyValue(PropertyNames.LangVersion)); var allowUnsafeCode = PropertyConverter.ToBoolean(projectInstance.GetPropertyValue(PropertyNames.AllowUnsafeBlocks), defaultValue: false); var outputKind = PropertyConverter.ToOutputKind(projectInstance.GetPropertyValue(PropertyNames.OutputType)); - var nullableContextOptions = PropertyConverter.ToNullableContextOptions(projectInstance.GetPropertyValue(PropertyNames.NullableContextOptions)); + var nullableContextOptions = PropertyConverter.ToNullableContextOptions(projectInstance.GetPropertyValue(PropertyNames.Nullable)); var documentationFile = projectInstance.GetPropertyValue(PropertyNames.DocumentationFile); var preprocessorSymbolNames = PropertyConverter.ToPreprocessorSymbolNames(projectInstance.GetPropertyValue(PropertyNames.DefineConstants)); var suppressedDiagnosticIds = PropertyConverter.ToSuppressedDiagnosticIds(projectInstance.GetPropertyValue(PropertyNames.NoWarn)); diff --git a/src/OmniSharp.MSBuild/ProjectFile/PropertyNames.cs b/src/OmniSharp.MSBuild/ProjectFile/PropertyNames.cs index 4bbf8076e2..15e889c663 100644 --- a/src/OmniSharp.MSBuild/ProjectFile/PropertyNames.cs +++ b/src/OmniSharp.MSBuild/ProjectFile/PropertyNames.cs @@ -21,7 +21,7 @@ internal static class PropertyNames public const string MSBuildExtensionsPath = nameof(MSBuildExtensionsPath); public const string MSBuildSDKsPath = nameof(MSBuildSDKsPath); public const string NoWarn = nameof(NoWarn); - public const string NullableContextOptions = nameof(NullableContextOptions); + public const string Nullable = nameof(Nullable); public const string OutputPath = nameof(OutputPath); public const string Platform = nameof(Platform); public const string ProjectAssetsFile = nameof(ProjectAssetsFile); From 38de063cdfe84c977a60d71946f68ce7fa743dc4 Mon Sep 17 00:00:00 2001 From: filipw Date: Wed, 31 Jul 2019 17:30:20 +0200 Subject: [PATCH 2/7] renamed test asset --- .../CSharp8AndNullableContext.csproj | 4 ++-- tests/OmniSharp.MSBuild.Tests/ProjectFileInfoTests.cs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/test-assets/test-projects/CSharp8AndNullableContext/CSharp8AndNullableContext.csproj b/test-assets/test-projects/CSharp8AndNullableContext/CSharp8AndNullableContext.csproj index f8c35733c7..2276fb8743 100644 --- a/test-assets/test-projects/CSharp8AndNullableContext/CSharp8AndNullableContext.csproj +++ b/test-assets/test-projects/CSharp8AndNullableContext/CSharp8AndNullableContext.csproj @@ -2,9 +2,9 @@ Exe - netcoreapp2.1 + netcoreapp3.0 8.0 - enable + enable \ No newline at end of file diff --git a/tests/OmniSharp.MSBuild.Tests/ProjectFileInfoTests.cs b/tests/OmniSharp.MSBuild.Tests/ProjectFileInfoTests.cs index 7baf050945..998bedfd44 100644 --- a/tests/OmniSharp.MSBuild.Tests/ProjectFileInfoTests.cs +++ b/tests/OmniSharp.MSBuild.Tests/ProjectFileInfoTests.cs @@ -125,7 +125,7 @@ public async Task CSharp8AndNullableContext_has_correct_property_values() Assert.NotNull(projectFileInfo); Assert.Equal(projectFilePath, projectFileInfo.FilePath); var targetFramework = Assert.Single(projectFileInfo.TargetFrameworks); - Assert.Equal("netcoreapp2.1", targetFramework); + Assert.Equal("netcoreapp3.0", targetFramework); Assert.Equal(LanguageVersion.CSharp8, projectFileInfo.LanguageVersion); Assert.Equal(NullableContextOptions.Enable, projectFileInfo.NullableContextOptions); Assert.Equal("Debug", projectFileInfo.Configuration); From 0691b1292b71bb40c221f77f617f5b6f36b8e136 Mon Sep 17 00:00:00 2001 From: filipw Date: Wed, 31 Jul 2019 17:39:49 +0200 Subject: [PATCH 3/7] nullable into CHANGELOG.md --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6ef11803c2..9b4fc39d13 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ All changes to the project will be documented in this file. ## [1.34.1] - not yet released * Fixed a regression introduced in 1.32.20 which caused `AllowUnsafeCode` in csproj to also enable `TreatWarningsAsErrors` behavior ([#1565](https://github.com/OmniSharp/omnisharp-roslyn/issues/1565), PR: [#1567](https://github.com/OmniSharp/omnisharp-roslyn/pull/1567)) +* Added support for reading C# 8.0 `Nullable` setting from csproj files (and dropped support for `NullableContextOptions` - based on the LDM decision to [rename the MSBuild property](https://github.com/dotnet/roslyn/issues/35432) ([#1573](https://github.com/OmniSharp/omnisharp-roslyn/pull/1573)) ## [1.34.0] - 2019-07-15 * Added support for Roslyn code actions that normally need UI - they used to be explicitly sipped by OmniSharp, now it surfaces them with predefined defaults instead. ([#1220](https://github.com/OmniSharp/omnisharp-roslyn/issues/1220), PR: [#1406](https://github.com/OmniSharp/omnisharp-roslyn/pull/1406)) These are: From ed6f75712e9cf4b0c40132a34e2d1c32dbfb296a Mon Sep 17 00:00:00 2001 From: filipw Date: Mon, 5 Aug 2019 12:54:13 +0200 Subject: [PATCH 4/7] changelog updates --- CHANGELOG.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9d22a565c2..4633b9720f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,8 +2,10 @@ All changes to the project will be documented in this file. ## [1.34.1] - 2019-07-31 +* Added support for "sync namespace" refactoring ([#1475](https://github.com/OmniSharp/omnisharp-roslyn/issues/1475), PR: [#1563](https://github.com/OmniSharp/omnisharp-roslyn/pull/1563)) * Fixed a regression introduced in 1.32.20 which caused `AllowUnsafeCode` in csproj to also enable `TreatWarningsAsErrors` behavior ([#1565](https://github.com/OmniSharp/omnisharp-roslyn/issues/1565), PR: [#1567](https://github.com/OmniSharp/omnisharp-roslyn/pull/1567)) -* Update to Roslyn `3.3.0-beta2-19376-02` (PR: [#1574](https://github.com/OmniSharp/omnisharp-roslyn/pull/1574)) +* Update to Roslyn `3.3.0-beta2-19376-02` (PR: [#1563](https://github.com/OmniSharp/omnisharp-roslyn/pull/1563)) +* Fixed a timeout issue in large analyzer bundles (i.e. FxCop analyzers) ([#1552](https://github.com/OmniSharp/omnisharp-roslyn/issues/1552), PR: [#1566](https://github.com/OmniSharp/omnisharp-roslyn/pull/1566)) ## [1.34.0] - 2019-07-15 * Added support for Roslyn code actions that normally need UI - they used to be explicitly sipped by OmniSharp, now it surfaces them with predefined defaults instead. ([#1220](https://github.com/OmniSharp/omnisharp-roslyn/issues/1220), PR: [#1406](https://github.com/OmniSharp/omnisharp-roslyn/pull/1406)) These are: From bae0846e687929847aaa98bb329e8abe7dab51ab Mon Sep 17 00:00:00 2001 From: filipw Date: Mon, 5 Aug 2019 15:38:21 +0200 Subject: [PATCH 5/7] Roslyn 3.3.0-beta2-19401-05 --- build/Packages.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/Packages.props b/build/Packages.props index b0f753faac..4bd771e31e 100644 --- a/build/Packages.props +++ b/build/Packages.props @@ -4,7 +4,7 @@ 16.0.461 5.0.0 - 3.3.0-beta2-19376-02 + 3.3.0-beta2-19401-05 2.4.0 From af9bca1c772e88ffbfe3b6f2ef2e62c8ecddd117 Mon Sep 17 00:00:00 2001 From: filipw Date: Mon, 5 Aug 2019 15:40:01 +0200 Subject: [PATCH 6/7] changelog note about Roslyn update --- CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4633b9720f..2381355503 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,9 @@ # Changelog All changes to the project will be documented in this file. +## [1.34.2] - not yet released +* Update to Roslyn `3.3.0-beta2-19401-05` which fixes a 1.34.1 regression resulting in StackOverflowException on code analysis of partial classes (PR: [#1579](https://github.com/OmniSharp/omnisharp-roslyn/pull/1579)) + ## [1.34.1] - 2019-07-31 * Added support for "sync namespace" refactoring ([#1475](https://github.com/OmniSharp/omnisharp-roslyn/issues/1475), PR: [#1563](https://github.com/OmniSharp/omnisharp-roslyn/pull/1563)) * Fixed a regression introduced in 1.32.20 which caused `AllowUnsafeCode` in csproj to also enable `TreatWarningsAsErrors` behavior ([#1565](https://github.com/OmniSharp/omnisharp-roslyn/issues/1565), PR: [#1567](https://github.com/OmniSharp/omnisharp-roslyn/pull/1567)) From 8f09b4ba0253af51a98f8f83c2f2880ef5f0704e Mon Sep 17 00:00:00 2001 From: Filip W Date: Tue, 6 Aug 2019 16:31:21 +0200 Subject: [PATCH 7/7] Update CSharp8AndNullableContext.csproj --- .../CSharp8AndNullableContext/CSharp8AndNullableContext.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test-assets/test-projects/CSharp8AndNullableContext/CSharp8AndNullableContext.csproj b/test-assets/test-projects/CSharp8AndNullableContext/CSharp8AndNullableContext.csproj index 2276fb8743..6302b45d90 100644 --- a/test-assets/test-projects/CSharp8AndNullableContext/CSharp8AndNullableContext.csproj +++ b/test-assets/test-projects/CSharp8AndNullableContext/CSharp8AndNullableContext.csproj @@ -7,4 +7,4 @@ enable - \ No newline at end of file +