KEMBAR78
Fix nullable annotations for `Preferences` by maxkoshevoi · Pull Request #6013 · dotnet/maui · GitHub
Skip to content

Conversation

@maxkoshevoi
Copy link
Contributor

@maxkoshevoi maxkoshevoi commented Apr 12, 2022

Description of Change

Setting and Getting null is totally valid (I'm using this functionality in my app), so existing annotations are incorrect.
Updated annotations to reflect underlying logic.

Issues Fixed

Fixes #
Do I need to create an issue for such a small change?

@jsuarezruiz jsuarezruiz added the area-essentials Essentials: Device, Display, Connectivity, Secure Storage, Sensors, App Info label Apr 13, 2022
@rmarinho rmarinho requested a review from mattleibow April 13, 2022 10:10
@rmarinho
Copy link
Member

/azp run

@rmarinho rmarinho requested a review from jfversluis April 13, 2022 10:10
@azure-pipelines
Copy link

Azure Pipelines successfully started running 2 pipeline(s).

@rmarinho rmarinho requested a review from Redth April 13, 2022 10:10
Copy link
Member

@rmarinho rmarinho left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Build failing

   "D:\a\_work\1\s\Microsoft.Maui.BuildTasks.slnf" (Build target) (1:2) ->
       "D:\a\_work\1\s\src\Core\src\Core.csproj" (default target) (2:40) ->
       "D:\a\_work\1\s\src\Core\src\Core.csproj" (Build target) (2:43) ->
       "D:\a\_work\1\s\src\Essentials\src\Essentials.csproj" (default target) (8:55) ->
       (CoreCompile target) -> 
         D:\a\_work\1\s\src\Essentials\src\Preferences\Preferences.shared.cs(38,12): error CS0246: The type or namespace name 'NotNullIfNotNullAttribute' could not be found (are you missing a using directive or an assembly reference?) [D:\a\_work\1\s\src\Essentials\src\Essentials.csproj]
         D:\a\_work\1\s\src\Essentials\src\Preferences\Preferences.shared.cs(38,12): error CS0246: The type or namespace name 'NotNullIfNotNull' could not be found (are you missing a using directive or an assembly reference?) [D:\a\_work\1\s\src\Essentials\src\Essentials.csproj]
         D:\a\_work\1\s\src\Essentials\src\Preferences\Preferences.shared.cs(101,12): error CS0246: The type or namespace name 'NotNullIfNotNullAttribute' could not be found (are you missing a using directive or an assembly reference?) [D:\a\_work\1\s\src\Essentials\src\Essentials.csproj]
         D:\a\_work\1\s\src\Essentials\src\Preferences\Preferences.shared.cs(101,12): error CS0246: The type or namespace name 'NotNullIfNotNull' could not be found (are you missing a using directive or an assembly reference?) [D:\a\_work\1\s\src\Essentials\src\Essentials.csproj]

@maxkoshevoi maxkoshevoi requested a review from rmarinho April 13, 2022 15:23
@rmarinho
Copy link
Member

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 2 pipeline(s).

@maxkoshevoi maxkoshevoi requested a review from mattleibow April 15, 2022 16:07
@mattleibow
Copy link
Member

/azp run

@mattleibow mattleibow added this to the 6.0.300-rc.3 milestone Apr 21, 2022
@azure-pipelines
Copy link

Azure Pipelines successfully started running 2 pipeline(s).

Copy link
Member

@mattleibow mattleibow left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The new nuget is causing issues and probably not worth it at all. netstandard is basically just there for the IDE tools, and they don't need all these things. Simplest is just to condition it out for the obsolete platforms.

@maxkoshevoi maxkoshevoi requested a review from mattleibow April 22, 2022 22:11
@mattleibow
Copy link
Member

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 2 pipeline(s).

@mattleibow mattleibow dismissed rmarinho’s stale review April 29, 2022 20:01

It is building again!

@mattleibow mattleibow merged commit 3aab9c5 into dotnet:main Apr 29, 2022
@maxkoshevoi maxkoshevoi deleted the mk/fix-preferences-annotations branch May 3, 2022 16:55
@github-actions github-actions bot locked and limited conversation to collaborators Dec 21, 2023
@samhouts samhouts added the fixed-in-6.0.300-rc.3 Look for this fix in 6.0.300-rc.3! label Aug 2, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

area-essentials Essentials: Device, Display, Connectivity, Secure Storage, Sensors, App Info fixed-in-6.0.300-rc.3 Look for this fix in 6.0.300-rc.3!

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants