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

Null check for sequences comparison #432

Merged
merged 2 commits into from
Aug 16, 2023

Conversation

mdanish-kh
Copy link
Contributor

@mdanish-kh mdanish-kh commented Aug 13, 2023

The exception is thrown at

contents.Add($"{id}.installer", manifests.InstallerManifest.ToYaml());

then
string manifestYaml = serializer.Serialize(value);

The installer manifest contains dependencies object with some null List sequences (WindowsFeatures, WindowsLibraries, ExternalDependencies). The Equals() method for Dependencies seems to be used externally while serializing the manifest and because null values are not handled properly, an exception is thrown.


Microsoft Reviewers: codeflow:open?pullrequest=https://github.com/microsoft/winget-create/pull/432&drop=dogfoodAlpha

@mdanish-kh mdanish-kh requested a review from a team as a code owner August 13, 2023 16:36
@mdanish-kh mdanish-kh requested review from yao-msft and ryfu-msft and removed request for a team August 13, 2023 16:36
@mdanish-kh mdanish-kh force-pushed the nullSequenceHandling branch 2 times, most recently from c41a06c to f8ee221 Compare August 13, 2023 18:20
@ryfu-msft
Copy link
Contributor

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@ryfu-msft
Copy link
Contributor

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@ryfu-msft ryfu-msft merged commit 8fb5e37 into microsoft:main Aug 16, 2023
4 checks passed
@mdanish-kh mdanish-kh deleted the nullSequenceHandling branch August 16, 2023 16:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Submitting a manifest fails with ERROR: Value cannot be null. (Parameter 'source')
2 participants