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

Centralized Nullable configuration #7332

Merged
merged 4 commits into from
Aug 10, 2024
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: 0 additions & 1 deletion src/CookieCrumble/src/CookieCrumble/CookieCrumble.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

<PropertyGroup>
<TargetFrameworks>$(Library2TargetFrameworks)</TargetFrameworks>
<Nullable>enable</Nullable>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<AssemblyName>CookieCrumble</AssemblyName>
<RootNamespace>CookieCrumble</RootNamespace>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

<PropertyGroup>
<TargetFrameworks>$(Library2TargetFrameworks)</TargetFrameworks>
<Nullable>enable</Nullable>

<IsPackable>false</IsPackable>

Expand Down
1 change: 1 addition & 0 deletions src/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
<NoWarn>$(NoWarn);CS0436;RS0026;RS0027;RS0041;AD0001;CS1591;NU5104;NU5128;NU5501</NoWarn>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>

<PropertyGroup Condition="'$(CI)' == 'true'">
Expand Down
2 changes: 0 additions & 2 deletions src/GreenDonut/src/Core/BatchDataLoader.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#nullable enable

namespace GreenDonut;

/// <summary>
Expand Down
2 changes: 0 additions & 2 deletions src/GreenDonut/src/Core/GroupedDataLoader.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#nullable enable

namespace GreenDonut;

/// <summary>
Expand Down
1 change: 0 additions & 1 deletion src/GreenDonut/src/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

<PropertyGroup>
<TargetFrameworks>$(LibraryTargetFrameworks)</TargetFrameworks>
<Nullable>enable</Nullable>
</PropertyGroup>

</Project>
1 change: 1 addition & 0 deletions src/GreenDonut/test/Core.Tests/GreenDonut.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
<PropertyGroup>
<AssemblyName>GreenDonut.Tests</AssemblyName>
<RootNamespace>GreenDonut</RootNamespace>
<Nullable>disable</Nullable>
</PropertyGroup>

<ItemGroup>
Expand Down
1 change: 0 additions & 1 deletion src/HotChocolate/ApolloFederation/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
<Import Project="$([MSBuild]::GetPathOfFileAbove('Directory.Build.props', '$(MSBuildThisFileDirectory)..\'))" />

<PropertyGroup>
<Nullable>enable</Nullable>
<TargetFrameworks>$(Library3TargetFrameworks)</TargetFrameworks>
</PropertyGroup>
</Project>
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#nullable enable

using HotChocolate.ApolloFederation.Resolvers;
using HotChocolate.Resolvers;
using HotChocolate.Types.Descriptors;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<Nullable>enable</Nullable>
</PropertyGroup>

<PropertyGroup>
<PackageId>HotChocolate.AspNetCore.Authorization.Opa</PackageId>
<AssemblyName>HotChocolate.AspNetCore.Authorization.Opa</AssemblyName>
Expand Down
4 changes: 0 additions & 4 deletions src/HotChocolate/AspNetCore/src/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,4 @@
<Import Project="$([MSBuild]::GetPathOfFileAbove('Directory.Build.props', '$(MSBuildThisFileDirectory)..\'))" />
<Import Project="$([MSBuild]::GetPathOfFileAbove('Nullable.props', '$(MSBuildThisFileDirectory)..\'))" />

<PropertyGroup>
<Nullable>enable</Nullable>
</PropertyGroup>

</Project>
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#nullable enable

namespace HotChocolate.AspNetCore.Tests.Utilities.Subscriptions.GraphQLOverWebSocket;

public sealed class SubscribePayload
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@
using HotChocolate.Utilities;
using static HotChocolate.Language.Utf8GraphQLRequestParser;

#nullable enable

namespace HotChocolate.AspNetCore.Tests.Utilities.Subscriptions.GraphQLOverWebSocket;

public static class WebSocketExtensions
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@
using Microsoft.AspNetCore.Builder;
using Microsoft.Extensions.DependencyInjection;

#nullable enable

namespace HotChocolate.AspNetCore.Subscriptions.Apollo;

public class WebSocketProtocolTests : SubscriptionTestBase
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@
using Xunit.Abstractions;
using static System.Net.WebSockets.WebSocketCloseStatus;

#nullable enable

namespace HotChocolate.AspNetCore.Subscriptions.GraphQLOverWebSocket;

public class WebSocketProtocolTests : SubscriptionTestBase
Expand Down
1 change: 0 additions & 1 deletion src/HotChocolate/AspNetCore/test/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@

<PropertyGroup>
<IsPackable>false</IsPackable>
<Nullable>enable</Nullable>
<GenerateDocumentationFile>false</GenerateDocumentationFile>
</PropertyGroup>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@
using Microsoft.Extensions.DependencyInjection;
using Xunit.Abstractions;

#nullable enable

namespace HotChocolate.Transport.Sockets.GraphQLOverWebSocket;

public class WebSocketClientProtocolTests(TestServerFactory serverFactory, ITestOutputHelper output)
Expand Down
1 change: 0 additions & 1 deletion src/HotChocolate/AzureFunctions/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
<PropertyGroup>
<TargetFrameworks>$(AzfTargetFrameworks)</TargetFrameworks>
<TargetFrameworks Condition="$(MSBuildProjectName.Contains('Isolated'))">$(AzfIsoProcTargetFrameworks)</TargetFrameworks>
<Nullable>enable</Nullable>
</PropertyGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
<AssemblyName>HotChocolate.AzureFunctions.IsolatedProcess</AssemblyName>
<RootNamespace>HotChocolate.AzureFunctions.IsolatedProcess</RootNamespace>
<Description>This package contains the GraphQL AzureFunctions Isolated Process integration for Hot Chocolate.</Description>
<Nullable>enable</Nullable>
</PropertyGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
<AssemblyName>HotChocolate.AzureFunctions</AssemblyName>
<RootNamespace>HotChocolate.AzureFunctions</RootNamespace>
<Description>This package contains the GraphQL AzureFunctions integration for Hot Chocolate.</Description>
<Nullable>enable</Nullable>
</PropertyGroup>

<ItemGroup>
Expand Down
1 change: 0 additions & 1 deletion src/HotChocolate/Caching/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
<Import Project="$([MSBuild]::GetPathOfFileAbove('Directory.Build.props', '$(MSBuildThisFileDirectory)..\'))" />

<PropertyGroup>
<Nullable>enable</Nullable>
<TargetFrameworks>$(Library2TargetFrameworks)</TargetFrameworks>
</PropertyGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
</ItemGroup>

<PropertyGroup>
<Nullable>enable</Nullable>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
</PropertyGroup>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
</PropertyGroup>

<PropertyGroup>
<Nullable>enable</Nullable>
<EnableTrimAnalyzer Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'net8.0'))">true</EnableTrimAnalyzer>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
</PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
<AssemblyName>HotChocolate.Authorization</AssemblyName>
<RootNamespace>HotChocolate.Authorization</RootNamespace>
<Description>This package contains the authorization abstractions for Hot Chocolate.</Description>
<Nullable>enable</Nullable>
</PropertyGroup>

<ItemGroup>
Expand Down
1 change: 0 additions & 1 deletion src/HotChocolate/Core/src/Core/HotChocolate.Core.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
<RootNamespace>HotChocolate</RootNamespace>
<Description>Contains the Hot Chocolate GraphQL query execution engine and query validation.</Description>
<NoWarn>$(NoWarn);NU5128</NoWarn>
<Nullable>enable</Nullable>
</PropertyGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,6 @@
<RootNamespace>HotChocolate.Execution</RootNamespace>
</PropertyGroup>

<PropertyGroup>
<Nullable>enable</Nullable>
</PropertyGroup>

<ItemGroup>
<ProjectReference Include="..\Abstractions\HotChocolate.Abstractions.csproj" />
</ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
using HotChocolate.Execution.Configuration;
using HotChocolate.Types.Pagination;

#nullable enable

// ReSharper disable once CheckNamespace
namespace Microsoft.Extensions.DependencyInjection;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<Nullable>enable</Nullable>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
</PropertyGroup>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#nullable enable

namespace HotChocolate.Execution.Processing;

/// <summary>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<Nullable>enable</Nullable>
</PropertyGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
using System.Runtime.CompilerServices;
using HotChocolate.Types.Descriptors;

#nullable enable

namespace HotChocolate.Types;

public sealed class UseDataLoaderAttribute : ObjectFieldDescriptorAttribute
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@
using static HotChocolate.Fetching.Utilities.ThrowHelper;
using static HotChocolate.WellKnownMiddleware;

#nullable enable

// ReSharper disable once CheckNamespace
namespace HotChocolate.Types;

Expand Down
2 changes: 0 additions & 2 deletions src/HotChocolate/Core/src/Fetching/FetchBatch.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#nullable enable

namespace HotChocolate.Fetching;

public delegate Task<IReadOnlyDictionary<TKey, TValue>> FetchBatch<TKey, TValue>(
Expand Down
2 changes: 0 additions & 2 deletions src/HotChocolate/Core/src/Fetching/FetchCache.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#nullable enable

namespace HotChocolate.Fetching;

public delegate Task<TValue> FetchCache<in TKey, TValue>(
Expand Down
2 changes: 0 additions & 2 deletions src/HotChocolate/Core/src/Fetching/FetchGroup.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#nullable enable

namespace HotChocolate.Fetching;

public delegate Task<ILookup<TKey, TValue>> FetchGroup<TKey, TValue>(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<Nullable>enable</Nullable>
</PropertyGroup>

<PropertyGroup>
<PackageId>HotChocolate.Fetching</PackageId>
<AssemblyName>HotChocolate.Fetching</AssemblyName>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
</PropertyGroup>

<PropertyGroup>
<Nullable>enable</Nullable>
<TargetFrameworks>$(Library2TargetFrameworks)</TargetFrameworks>
</PropertyGroup>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
</PropertyGroup>

<PropertyGroup>
<Nullable>enable</Nullable>
<TargetFrameworks>$(Library2TargetFrameworks)</TargetFrameworks>
</PropertyGroup>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
</PropertyGroup>

<PropertyGroup>
<Nullable>enable</Nullable>
<TargetFrameworks>$(Library3TargetFrameworks)</TargetFrameworks>
</PropertyGroup>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
</PropertyGroup>

<PropertyGroup>
<Nullable>enable</Nullable>
<TargetFrameworks>$(Library2TargetFrameworks)</TargetFrameworks>
</PropertyGroup>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
</PropertyGroup>

<PropertyGroup>
<Nullable>enable</Nullable>
<TargetFrameworks>$(Library2TargetFrameworks)</TargetFrameworks>
</PropertyGroup>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
</PropertyGroup>

<PropertyGroup>
<Nullable>enable</Nullable>
<TargetFrameworks>$(Library2TargetFrameworks)</TargetFrameworks>
</PropertyGroup>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
</PropertyGroup>

<PropertyGroup>
<Nullable>enable</Nullable>
<TargetFrameworks>$(Library2TargetFrameworks)</TargetFrameworks>
</PropertyGroup>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
<PropertyGroup>
<TargetFrameworks>netstandard2.0</TargetFrameworks>
<TargetFramework>netstandard2.0</TargetFramework>
<Nullable>enable</Nullable>
<IncludeBuildOutput>false</IncludeBuildOutput> <!-- Do not include the generator as a lib dependency -->
<IncludeSymbols>false</IncludeSymbols>
<EnforceExtendedAnalyzerRules>true</EnforceExtendedAnalyzerRules>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#nullable enable

using HotChocolate.Configuration;
using HotChocolate.Resolvers;
using HotChocolate.Types.Descriptors;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<Nullable>enable</Nullable>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
</PropertyGroup>

Expand Down
2 changes: 0 additions & 2 deletions src/HotChocolate/Core/src/Types.CursorPagination/IndexEdge.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
using System.Buffers.Text;

#nullable enable

namespace HotChocolate.Types.Pagination;

public sealed class IndexEdge<T> : Edge<T>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<Nullable>enable</Nullable>
</PropertyGroup>

<PropertyGroup>
<PackageId>HotChocolate.Types.Errors</PackageId>
<AssemblyName>HotChocolate.Types.Errors</AssemblyName>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<Nullable>enable</Nullable>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
</PropertyGroup>

Expand Down
Loading
Loading