Skip to content
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

Add nullable annotations to NuGet.Configuration #13250

Closed
zivkan opened this issue Feb 17, 2024 · 0 comments · Fixed by NuGet/NuGet.Client#5635
Closed

Add nullable annotations to NuGet.Configuration #13250

zivkan opened this issue Feb 17, 2024 · 0 comments · Fixed by NuGet/NuGet.Client#5635
Assignees
Labels
Category:BreakingChange Functionality:SDK The NuGet client packages published to nuget.org Priority:3 Issues under consideration. With enough upvotes, will be reconsidered to be added to the backlog. Type:DCR Design Change Request
Milestone

Comments

@zivkan
Copy link
Member

zivkan commented Feb 17, 2024

NuGet.Configuration is a package that is part of the NuGet Client SDK. We are adding null annotations, so projects using nullable reference types will benefit from compiler null checking, leading to improved software reliability (fewer NullReferenceExceptions).

Generally when annotating nulls we try to avoid making any breaking API or ABI changes. However, the following changes have been made in order to allow the compiler to provide everyone with the most useful nullable warnings.

Projects that use this package and enable nullable checks might find that upgrading to a version of the package that now has nullable annotations will generate warnings that previously did not generate warnings. This is a natural consequence of annotating the assembly where it previously lacked annotations.

In addition, the following breaking changes were implemented:
 

Changes to SettingsBase and SettingsElement

To make the compiler's null checking more accurate, some properties were changed, and some abstract class constructors changed. This should only affect classes that extend the abstract classes. NuGet.Configuration does not provide extensibility to allow custom configuration sections via Settings.Load*. Therefore, while these are technically breaking API changes, it's not expected to affect common usage of NuGet.Configuration.

@zivkan zivkan added Functionality:SDK The NuGet client packages published to nuget.org Priority:3 Issues under consideration. With enough upvotes, will be reconsidered to be added to the backlog. Type:DCR Design Change Request Category:BreakingChange labels Feb 17, 2024
@zivkan zivkan self-assigned this Feb 17, 2024
@zivkan zivkan added this to the 6.10 milestone Feb 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Category:BreakingChange Functionality:SDK The NuGet client packages published to nuget.org Priority:3 Issues under consideration. With enough upvotes, will be reconsidered to be added to the backlog. Type:DCR Design Change Request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants