-
Notifications
You must be signed in to change notification settings - Fork 113
Fix some warnings/nullable inconsistencies. #1451
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
base: main
Are you sure you want to change the base?
Conversation
…nt can be passed a null value
…ing annotations, plus 'fixes' from that.
@@ -10,6 +10,7 @@ namespace Calamari.Common.Features.Deployment.Journal | |||
{ | |||
public class DeployedPackage | |||
{ | |||
#pragma warning disable CS8618 // Non-nullable field must contain a non-null value when exiting constructor - Handled by guard method. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm confused - the API allows null - but then we bounce it via the Guard?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's because when using the XElement constructor, the PackageId or PackageVersion might come out as null, and this gives you a 'nice' message?
Background
Calamari has a whole bunch of build warnings, and nullable things that are inconsistent/misleading.
The PR endeavors to fix some of these problems.
How to review
For once, my commits are well named, and each contains a specific change across files, or changes in a single file. It would probably be best to go through each commit one at a time, using the commit message for context, rather than attempting to review the whole PR without context.