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

Support sibling snupkg file #926

Conversation

drewnoakes
Copy link
Contributor

Fixes #925.

When opening a nupkg file from disk, if its symbols are in a snupkg file next to it, it would be flagged as having no symbols. This commit tests for such a file, using it if possible, before returning to the prior behaviour of checking nuget.org for packages identified as coming from there.

@clairernovotny
Copy link
Member

I’ll test and merge tomorrow, thanks!

Copy link
Member

@clairernovotny clairernovotny left a comment

Choose a reason for hiding this comment

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

One final thing and then it'll be ready.

requireExternal = true;
if (response.IsSuccessStatusCode) // we'll get a 404 if none
{
requireExternal = true;
Copy link
Member

Choose a reason for hiding this comment

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

We need to set requireExternal to true for the local snupkg case as well. This is because it'll ultimately require a symbol server to work.

@clairernovotny
Copy link
Member

Oh, one other thought -- as long as we're checking for .snupkg sibling files, we should also check for .symbols.nupkg.

@drewnoakes drewnoakes force-pushed the load-sibling-snupkg-file branch 2 times, most recently from f9ea300 to b500bea Compare April 5, 2020 02:49
{
ReadSnupkgFile(snupkgFilePath);
}
if (File.Exists(symbolsFilePath))
Copy link
Member

Choose a reason for hiding this comment

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

should be else if

When opening a nupkg file from disk, if its symbols are in a .snupkg or .symbols.snupkg file next to it, it would be flagged as having no symbols. This commit tests for such a file, using it if possible, before returning to the prior behaviour of checking nuget.org for packages identified as coming from there.
@clairernovotny clairernovotny merged commit d7d045c into NuGetPackageExplorer:master Apr 5, 2020
@drewnoakes drewnoakes deleted the load-sibling-snupkg-file branch April 5, 2020 22:36
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.

Opening local .nupkg doesn't pick up sibling .snupkg
2 participants