Nullable Reference Types for main library by NickCraver · Pull Request #2041 · StackExchange/StackExchange.Redis

added 15 commits

March 16, 2022 07:59
The tooling caught the GeoPosition?[] => GeoPosition[] regression - excellent!
Revising what the user experience is like with NRTs here.

NickCraver

@NickCraver

@NickCraver NickCraver changed the title WIP: Nullable Reference Types for main library Nullable Reference Types for main library

Mar 26, 2022

@NickCraver

@NickCraver

This removed the parent bits and just accepts a null case, code before this was likely an iteration that just didn't get all the way to simplest.

@NickCraver

In prep for more PRs and easier reviews, turning a lot of the language features on that I've addressed as part of NRTs but doing further here while having to review all changes anyhow. These are minor, but align on styles.

slorello89

@NickCraver

@NickCraver

@NickCraver

@NickCraver

@NickCraver

@NickCraver

@NickCraver

@NickCraver

@NickCraver

@NickCraver

@NickCraver

There are things we're removing completing in 3.0 which means actually binary breaks potentially, vs. people opting into warnings as errors on a 2.x release - decision is to go with a minor here and embrace warnings as warnings. If you want to hard break on warnings (like our existing `[Obsolete(error = false)]` additions), so be it.

@NickCraver

@NickCraver

Return an empty array instead (key is already the null indicator - an empty array is good here).
If we can't parse a response, properly throw here and go not nullable.

slorello89

@NickCraver

slorello89

mgravell

philon-msft

@NickCraver