google / deps.dev

Resources for the deps.dev API
https://deps.dev
Apache License 2.0
258 stars 20 forks source link

Nuget packages missing repositories #29

Closed noqcks closed 1 year ago

noqcks commented 1 year ago

For example this nuget package: https://deps.dev/nuget/azure.core

Has the Homepage: https://github.com/Azure/azure-sdk-for-net/blob/Azure.Core_1.34.0/sdk/core/Azure.Core/README.md but no Repo

The Repo should be https://github.com/Azure/azure-sdk-for-net/

Another example is this package: https://deps.dev/nuget/microsoft.aspnetcore.authorization

Which contains in the description "This package was built from the source code at https://github.com/dotnet/aspnetcore/tree" but doesn't contain Repo metadata

benmss commented 1 year ago

I think the problem lies in how the nuget.org reports URLs in the meta data it provides for packages. Examining the meta data retrieved for azure.core, there is a URL for the "Project website" as listed on the package page, but no URL for the "Source repository".

Taking another package, nuget.server.core, both "Project website" and "Source repostiory" are the same, which means the included URL in the meta data happens to be correct: https://github.com/NuGet/NuGet.Server, but is also absent in deps.dev as a repository link.

For context, we have a repository finding feature in our project: Macaron. Currently it is fine-tuned for Java packages. We are considering use of deps.dev for other ecosystems, but there are some problems -- like this one.

josieang commented 1 year ago

Thanks @noqcks for filing this issue! I've just looked into it and it's a bug on our part. For NuGet, we get the repository from the nuspec file's Repository tag but it wasn't being propagated properly through to our user-facing services. Both of the package versions that you mentioned have this tag populated. From my knowledge, we don't use the project URL to populate the repository in deps.dev, we only use the Repository tag.

For https://api.nuget.org/v3-flatcontainer/microsoft.aspnetcore.authorization/7.0.10/microsoft.aspnetcore.authorization.nuspec

<repository type="git" url="https://github.com/dotnet/aspnetcore" commit="5a4c82ec57fadddef9ce841d608de5c7c8c74446"/>

and for https://api.nuget.org/v3-flatcontainer/azure.core/1.34.0/azure.core.nuspec.

<repository type="git" url="https://github.com/Azure/azure-sdk-for-net" commit="616f600f67a2494d9d046daa79d4d470d1b52284"/>

Also, @benmss, on my end, I see a Source Repository link for Azure.Core on nuget.org under the About section. If you've noticed anything odd on deps.dev please don't hesitate to file an issue, we appreciate the feedback.

I've submitted a fix for this but it will take a while for it to propagate through our system. I will report back here when that is done.

adg commented 1 year ago

This has been fixed. Please let us know if you find any other inconsistencies. Thanks for the report.