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

Remove compiler package and update sourcelink #2498

Merged
merged 3 commits into from Mar 17, 2021
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 2 additions & 3 deletions Src/Directory.Build.props
Expand Up @@ -3,10 +3,9 @@
<AutofacPackageVersion>4.6.2</AutofacPackageVersion>
<BenchmarkDotNetPackageVersion>0.10.10</BenchmarkDotNetPackageVersion>
<FSharpCorePackageVersion>4.2.3</FSharpCorePackageVersion>
<MicrosoftCodeAnalysisFxCopAnalyzersPackageVersion>2.9.2</MicrosoftCodeAnalysisFxCopAnalyzersPackageVersion>
<MicrosoftCodeAnalysisNetAnalyzersPackageVersion>5.0.3</MicrosoftCodeAnalysisNetAnalyzersPackageVersion>
<MicrosoftCSharpPackageVersion>4.3.0</MicrosoftCSharpPackageVersion>
<MicrosoftSourceLinkGitHubPackageVersion>1.0.0-beta2-19367-01</MicrosoftSourceLinkGitHubPackageVersion>
<MicrosoftNetCompilersToolsetPackageVersion>3.8.0</MicrosoftNetCompilersToolsetPackageVersion>
<MicrosoftSourceLinkGitHubPackageVersion>1.0.0</MicrosoftSourceLinkGitHubPackageVersion>
<MicrosoftNETTestSdkPackageVersion>16.3.0</MicrosoftNETTestSdkPackageVersion>
<MoqPackageVersion>4.8.1</MoqPackageVersion>
<NunitPackageVersion>3.11.0</NunitPackageVersion>
Expand Down
4 changes: 1 addition & 3 deletions Src/Newtonsoft.Json/JsonSerializer.cs
Expand Up @@ -867,9 +867,7 @@ internal virtual void PopulateInternal(JsonReader reader, object target)
[DebuggerStepThrough]
public T? Deserialize<T>(JsonReader reader)
{
#pragma warning disable CS8601 // Possible null reference assignment.
return (T)Deserialize(reader, typeof(T));
#pragma warning restore CS8601 // Possible null reference assignment.
return (T?)Deserialize(reader, typeof(T));
}

/// <summary>
Expand Down
4 changes: 1 addition & 3 deletions Src/Newtonsoft.Json/Newtonsoft.Json.csproj
Expand Up @@ -39,10 +39,8 @@
<None Include="$(PackageIconFullPath)" Pack="true" PackagePath="\"/>
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.CodeAnalysis.FxCopAnalyzers" Version="$(MicrosoftCodeAnalysisFxCopAnalyzersPackageVersion)" PrivateAssets="All" />
<PackageReference Include="Microsoft.CodeAnalysis.NetAnalyzers" Version="$(MicrosoftCodeAnalysisNetAnalyzersPackageVersion)" PrivateAssets="All" />
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="$(MicrosoftSourceLinkGitHubPackageVersion)" PrivateAssets="All" />
<!-- Compiler to support nullable in non-preview VS2019 -->
<PackageReference Include="Microsoft.Net.Compilers.Toolset" Version="$(MicrosoftNetCompilersToolsetPackageVersion)" PrivateAssets="All" />
</ItemGroup>
<PropertyGroup Condition="'$(TargetFramework)'=='net45'">
<AssemblyTitle>Json.NET</AssemblyTitle>
Expand Down
4 changes: 4 additions & 0 deletions Src/Newtonsoft.Json/Utilities/DictionaryWrapper.cs
Expand Up @@ -492,8 +492,12 @@ void IDictionary.Add(object key, object value)
#endif
else
{
// Consider changing this code to call GenericDictionary.Remove when value is null.
//
#pragma warning disable CS8601 // Possible null reference assignment.
#pragma warning disable CS8600 // Converting null literal or possible null value to non-nullable type.
GenericDictionary[(TKey)key] = (TValue)value;
#pragma warning restore CS8600 // Converting null literal or possible null value to non-nullable type.
#pragma warning restore CS8601 // Possible null reference assignment.
}
}
Expand Down