Conversation
|
Everything compiles and looks good, but I want to run some tests on this before merging. |
|
The last GitHub Action warning is a bit of a doozy:
The .NET Core (3+) Currently this attribute is only used in one location. We can disable the warning in #pragma warning disable CS0436 // Type conflicts with imported type
// The NotNullWhen attribute will raise a warning when compiled with .NET Core 3 or greater, as it conflicts with the one in System.Diagnostics.CodeAnalysis.
// Disable the warning.
public static bool TryParse(string s, uint defaultPort, [NotNullWhen(true)] out IPEndPoint? result)
#pragma warning restore CS0436 // Type conflicts with imported type
Given that there are already a bunch of Resharper suppressions in code ( |
a118f19 to
c308a82
Compare
Overview
This resolves 16 build warnings, including (🤞) 10/11 of the GitHub build action checks, eg:

Changes
Layouter.csThe
/Source/Client/Multiplayer.csprojdoesn't include<Nullable>enable</Nullable>like a lot of the othercsprojfiles do, and I'm not 100% of the ramifications of enabling it project-wide, so I only enabled it for this file (which was clearly trying to use nullable types).Native.csThe best definition for the Mono entrypoint I could find is in the Mono repo. Since we're already passing
nullfor some of the strings, and their example code literally says:It seems safe to switch these to
string?to resolve warnings.LoggingByteWriter.csThe base class
ByteWriteraccepts and handlesnullfor both methods.ServerLog.csEverywhere these
infoanderroractions are used, a null check is already performed.