Skip to content

[Feature] Microsoft.Toolkit lacks nullability annotations (and others) #3436

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Sergio0694 opened this issue Aug 17, 2020 · 3 comments
Closed
Labels
feature request 📬 A request for new changes to improve functionality improvements ✨ .NET Components which are .NET based (non UWP specific)
Milestone

Comments

@Sergio0694
Copy link
Member

Sergio0694 commented Aug 17, 2020

Overview

I was going through the codebase for the main Microsoft.Toolkit package while reading #3315 and noticed the package has a few inconsistencies and issues now compared to the other .NET Standard packages (especially Mvvm and HighPerformance):

  • It lacks the nullability annotations
  • It lacks some extra annotations in general (eg. [Pure] when needed)
  • Some methods have unclear/inconsistent behavior. For instance, some string extensions are fine with null parameters and in that case just return null. Some are fine with null inputs but always return non null. Some just crash. The behavior should just be made consistent with all (I'd say they should just accept a non nullable string and crash if one is received).

Describe the solution

I can make a PR to address these various points if that's fine for you guys.
@azchohfi if it makes things easier, should I wait for yours or some other PR to be merged in first (to avoid conflicts) or is that not important and I can just branch off of master when I have some time and start working on this?

P.S. @michael-hawker opened an issue first this time 🙈

@Sergio0694 Sergio0694 added improvements ✨ feature request 📬 A request for new changes to improve functionality .NET Components which are .NET based (non UWP specific) labels Aug 17, 2020
@ghost
Copy link

ghost commented Aug 17, 2020

Hello, 'Sergio0694! Thanks for submitting a new feature request. I've automatically added a vote 👍 reaction to help get things started. Other community members can vote to help us prioritize this feature in the future!

@ghost ghost added this to the 7.1 milestone Jan 7, 2021
@michael-hawker
Copy link
Member

@Sergio0694 you completed this, eh? We can move this back to 7.0 and close?

@Sergio0694
Copy link
Member Author

Yup, I've added the annotations and enabled nullable types right in the .csproj for the whole package, we're good! 😄

@Sergio0694 Sergio0694 modified the milestones: 7.1, 7.0 Mar 2, 2021
@ghost ghost locked as resolved and limited conversation to collaborators May 1, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature request 📬 A request for new changes to improve functionality improvements ✨ .NET Components which are .NET based (non UWP specific)
Projects
None yet
Development

No branches or pull requests

2 participants