-
Notifications
You must be signed in to change notification settings - Fork 643
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
API / endpoint for snupkg's #7912
Comments
This is a great idea! I would love to have a similar "debuggable" indicator on nuget.org and Visual Studio. I think at the bare minimum we could add a documented service index entry for the .snupkg resource.
Even with the .snupkg API, wouldn't you need to do this regardless? A package may have .DLLs whose symbols are on the Microsoft symbol server but not in its corresponding symbol package. /cc @cristinamanum who worked on the symbols feature. |
I think it's important to define what dll's are relevant to be validated. For now, in NPE, I'm just checking ones in I've just released 5.6.18 of NPE with support for Source Link validation. I only support snupkg checking if the package came from |
Yup that's very fair.
I just played around with the latest version, it works like a charm! :)
Even with that |
Good catch re |
I've found this repository invaluable: https://github.com/dotnet/symstore I took a crack at this problem a while back when I was trying to prototype a similar feature. Maybe it might help! https://github.com/loic-sharma/NuGet.Quality/blob/6fcb1d2e47568a721d1d6fdf62b161c22ab2ad8a/Program.cs#L162-L188 |
@loic-sharma I just published 5.6.23, which checks the Microsoft symbol server for Microsoft files. It fixes this. I saw your TODO about ensuring symbols match the PE file... any leads on that? |
Yes nuget.org does this validation at .snupkg ingestion. The steps are:
Please let me know if you have any questions EDIT: By the way, I believe this checksum entry stuff only works with portable PDBs. I believe DLLs don't have checksum entries for Windows PDBs. |
We're in the process of changing how we deal with NuGet packages and this could be helpful for us. Honestly it would be very convenient if NuGetGallery was also a symbol server in the same way NuGet.org is; simply publish a symbol package and the symbols are handy for debug! Combine with Source Link and we have minimal configuration universal debugging. This is not on our short-term list though, just adding this to my wishlist and subscribing to updates :) |
@TheXenocide are you running your own private NuGet server? If so, some third-party NuGet servers also work as symbol servers like Sleet or BaGet. For a full list of third-party servers see this documentation: https://docs.microsoft.com/en-us/nuget/hosting-packages/overview |
@loic-sharma we currently use NuGet Gallery for our private nuget servers. We previously used the TeamCity integrated server but had significant performance issues with it which were causing other issues in our builds, so we separated from that and have just been using this project as our NuGet repository. We could consider an alternative, it just came to mind since NuGet.org has built-in symbol server support and I was thinking it would be nice to have it in our local version of the gallery as well. We're honestly a little ways out before we could consider employing any of this anyway (and would more particularly benefit from it once there's a TFVC implementation of Source Link), just thought I'd note that it would be nice in combination with this here. |
@TheXenocide you could also just include the PDB in your main nupkg and not worry about symbol servers at all. Add this to your props/csproj file: https://github.com/clairernovotny/DeterministicBuilds/blob/master/Directory.Build.props#L10 |
We need an API / metadata on the package that points to a snupkg, if the package has one.
The scenario is that tooling may need to download all symbols for a NuGet package as part of validation steps, such as ensuring the Source Link information is properly embedded.
Currently the only option is to use the CDN endpoint, and check with a HEAD:
https://globalcdn.nuget.org/symbol-packages/{lowercase ID}.{lowercase normalized version}.snupkg
There's no guarantees around this endpoint, however.
Downloading each PDB via the symbol server API is less efficient as each pdb needs to be calculated and downloaded, if published, individually. For validation scenarios, all pdb's would be required anyway.
--
There's another scenario where people find it generally useful to see what's in the snupkg package, downloading and opening with a tool like NuGet Package Explorer.
--
NuGet Package Explorer intends on helping people know if packages are properly Source Linked and thus needs to perform all these steps: NuGetPackageExplorer/NuGetPackageExplorer#904
The text was updated successfully, but these errors were encountered: