dotnet / roslyn

The Roslyn .NET compiler provides C# and Visual Basic languages with rich code analysis APIs.
https://docs.microsoft.com/dotnet/csharp/roslyn-sdk/
MIT License
18.85k stars 4.01k forks source link

Add flag to control nullable feature #26692

Closed jcouv closed 6 years ago

jcouv commented 6 years ago

For the prototype, we're using LangVersion as the flag for both language version and nullable annotations. At a minimum, we need an ability (separate from LangVersion) to disable nullable warnings.

From discussions with Chuck, we would have to decide whether this flag affects the symbols that we produce:

Some related questions, when the feature is turned off:

Tagging @cston @AlekseyTs

Relates to https://github.com/dotnet/roslyn/issues/26199

AlekseyTs commented 6 years ago

I don't think LanguageVersion should affect "shape" of symbols. Otherwise, sharing of symbols is going to be affected in a negative way, as well as this is likely to complicate the Reference manager and make it dependent on ParserOptions, which never happened before.

jcouv commented 6 years ago

From LDM discussion today:

cston commented 6 years ago

Updated LDM decision to use [NonNullTypes] to enable warnings.