ChilliCream / graphql-platform

Welcome to the home of the Hot Chocolate GraphQL server for .NET, the Strawberry Shake GraphQL client for .NET and Banana Cake Pop the awesome Monaco based GraphQL IDE.
https://chillicream.com
MIT License
5.28k stars 748 forks source link

StrawberryShake 13 emits warnings warning CS8604: Possible null reference argument for parameter 'data' in... #5869

Closed nightroman closed 11 months ago

nightroman commented 1 year ago

Is there an existing issue for this?

Product

Strawberry Shake

Describe the bug

StrawberryShake 13 emits warnings warning CS8604: Possible null reference argument for parameter 'data' in...

Source code: SSv13.zip

Steps to reproduce

  1. Use the attached project and change to it
  2. Run dotnet build
  3. See warnings

Relevant log output

MSBuild version 17.4.1+fedecea9d for .NET
  Determining projects to restore...
  Restored C:\Users\roman.kuzmin\source\repos\bugs\HotChocolate\SSv13_230219_1910\SSv13\Nexar.Client.csproj (in 172 ms).
  Generate C# Clients started.
  Generate NexarClient started.
  Generate NexarClient completed in 903 ms
  Generate C# Clients completed in 1028 ms
C:\Users\roman.kuzmin\source\repos\bugs\HotChocolate\SSv13_230219_1910\SSv13\obj\Debug\net6.0\berry\NexarClient.Client.cs(2537,495): warning CS8604: Possible null reference argument for parameter 'data' in 'ITaskByNodeId_Node_Assignee TaskByNodeIdResultFactory.MapNonNullableITaskByNodeId_Node_Assignee(DesUserData data)'. [C:\Users\roman.kuzmin\source\repos\bugs\HotChocolate\SSv13_230219_1910\SSv13\Nexar.Client.csproj]
C:\Users\roman.kuzmin\source\repos\bugs\HotChocolate\SSv13_230219_1910\SSv13\obj\Debug\net6.0\berry\NexarClient.Client.cs(2537,557): warning CS8604: Possible null reference argument for parameter 'data' in 'ITaskByNodeId_Node_CreatedBy TaskByNodeIdResultFactory.MapNonNullableITaskByNodeId_Node_CreatedBy(DesUserData data)'. [C:\Users\roman.kuzmin\source\repos\bugs\HotChocolate\SSv13_230219_1910\SSv13\Nexar.Client.csproj]
C:\Users\roman.kuzmin\source\repos\bugs\HotChocolate\SSv13_230219_1910\SSv13\obj\Debug\net6.0\berry\NexarClient.Client.cs(2537,621): warning CS8604: Possible null reference argument for parameter 'data' in 'ITaskByNodeId_Node_ModifiedBy TaskByNodeIdResultFactory.MapNonNullableITaskByNodeId_Node_ModifiedBy(DesUserData data)'. [C:\Users\roman.kuzmin\source\repos\bugs\HotChocolate\SSv13_230219_1910\SSv13\Nexar.Client.csproj]
  Nexar.Client -> C:\Users\roman.kuzmin\source\repos\bugs\HotChocolate\SSv13_230219_1910\SSv13\bin\Debug\net6.0\Nexar.Client.dll

Build succeeded.

Additional Context?

No response

Version

13.0.2

nightroman commented 1 year ago

v13.2, same issue

GKotfis commented 1 year ago

This issue is a blocker when you have a <TreatWarningsAsErrors>true</TreatWarningsAsErrors> on solution :( Block me with migration to v13.

johan-lindqvist commented 1 year ago

We're also experiencing this issue, to get past the warnings our current workaround is to ignore the warning in the project

By adding this in the csproj-file

<NoWarn>8604</NoWarn>
glen-84 commented 11 months ago

Closing as a duplicate of #3985.