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

Handle case of null packageStream #977

Merged
merged 1 commit into from
Apr 5, 2022

Conversation

danmoseley
Copy link
Member

@danmoseley danmoseley commented Apr 4, 2022

@danmoseley danmoseley requested a review from a team as a code owner April 4, 2022 16:11
@danmoseley
Copy link
Member Author

cc @jkoritzinsky

Copy link
Member

@jkoritzinsky jkoritzinsky left a comment

Choose a reason for hiding this comment

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

Given the NuGet lInk you shared earlier, LGTM. cc: @sharwell

downloadResult.PackageSource,
#pragma warning restore SA1114 // Parameter list should follow declaration
#endif
downloadResult.PackageStream,
Copy link
Member

Choose a reason for hiding this comment

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

In the reference link, this path passes both the PackageReader and the PackageStream. Should we be doing that?

Copy link
Member Author

Choose a reason for hiding this comment

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

That's the 3rd overload, and it would require stream not be null too:
https://github.com/nuget/nuget.client/blob/0ff5f67097522299620f34bd13f92d3d58e41f93/src/NuGet.Core/NuGet.Packaging/PackageExtractor.cs#L152

Again though I really am just pattern matching here. We could commit this on the assumption that clearly it would only affect a path that's failing already. Or, we could consult someone on the Nuget team, what do you prefer?

@danmoseley

This comment was marked as resolved.

@sharwell

This comment was marked as resolved.

@dotnet dotnet deleted a comment from azure-pipelines bot Apr 4, 2022
@danmoseley
Copy link
Member Author

Rerunning now tests fixed

@danmoseley danmoseley closed this Apr 5, 2022
@danmoseley danmoseley reopened this Apr 5, 2022
@danmoseley
Copy link
Member Author

@sharwell now failing thus

error : Failed to verify the root directory of local source 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools/nuget/v3/index.json'.
The given path's format is not supported.

@danmoseley danmoseley closed this Apr 5, 2022
@danmoseley danmoseley reopened this Apr 5, 2022
@danmoseley
Copy link
Member Author

@sharwell can you please review?

@sharwell sharwell merged commit 28e0819 into dotnet:main Apr 5, 2022
@danmoseley danmoseley deleted the fix.null.packageStream branch April 7, 2022 00:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ArgumentNullException from NuGet calls in Microsoft.CodeAnalysis.Testing.ReferenceAssemblies.ResolveAsync
3 participants