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

renamed NullableContextOptions to Nullable #1573

Merged
merged 5 commits into from
Aug 9, 2019
Merged
Show file tree
Hide file tree
Changes from all 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
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ 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))
* 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.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))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,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));
Expand Down Expand Up @@ -224,7 +224,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));
Expand Down
2 changes: 1 addition & 1 deletion src/OmniSharp.MSBuild/ProjectFile/PropertyNames.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp2.1</TargetFramework>
<TargetFramework>netcoreapp3.0</TargetFramework>
<LangVersion>8.0</LangVersion>
<NullableContextOptions>enable</NullableContextOptions>
<Nullable>enable</Nullable>
</PropertyGroup>

</Project>
</Project>
2 changes: 1 addition & 1 deletion tests/OmniSharp.MSBuild.Tests/ProjectFileInfoTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down