Nullness - Consider supporting Nullable shorthand for TreatWarningsAsErrors
Is your feature request related to a problem? Please describe.
In C# it's possible to convert all nullable-related warnings to errors using <WarningsAsErrors>nullable</WarningsAsErrors>. From docs:
The set of all nullability warnings can be specified with the Nullable shorthand.
So in line with https://github.com/dotnet/fsharp/pull/17486 it would be nice to have WAE behaviour as well.
Describe the solution you'd like
Support <WarningsAsErrors>nullable</WarningsAsErrors>
Describe alternatives you've considered
Just use specific warning numbers or even true.
Additional context
.
So the nullable would be a shorthand for putting in all nullness-related errors, on top of the option for specifying error codes individually.
Do I understand it right?
So the
nullablewould be a shorthand for putting in all nullness-related errors, on top of the option for specifying error codes individually.Do I understand it right?
Yeah, I think that's what C# does currently.
So the
nullablewould be a shorthand for putting in all nullness-related errors, on top of the option for specifying error codes individually.Do I understand it right?
Yes, not sure about implementation details (csc also supports /warnaserror:nullable option, so maybe it's handled completely by roslyn) but it definitely behaves like that and recommended as a solution:
SO: How to treat ALL C# 8 nullable reference warnings as errors? Roslyn 1: Provide single option to treat nullable issues as errors not warnings Roslyn 2: Proposal: Add switch for treating nullable-related warnings as errors
It's done, reopen if you still see it with F# 9
This was not done, this proposal is about a syntactical shorthand for doing warningsAsErrors for all nullable-related warnings. (as opposed to listing individual error codes)
I thought that we did it already for some reason