Open mgrojo opened 4 months ago
Maybe it's better to do this in our website generation scripts rather than doing a one-time update to the index.
In principle there's no problem with updating the manifests, but maybe some people would be unhappy about seing their public manifests changed without notice, even for this kind of improvement.
It's going to be harder to do on the website script than in alr itself. Some kind of heuristic: if the website
is not set, then look for release origin and see if it's a GitHub or Gitlab repo or tarball.
Many crates don't include a website field. When you see the crate in https://alire.ada.dev/ there's no direct way to get more information to know about the crate when exploring libraries to use. But the repository is many times the only resource you need, so you can take a look at the origin field in the command line (
alr show
) to discover the repository URL.I don't see a reason why a crate should not have a website referenced, even if the page is just a repository with a README, or a basic info page where the archive is downloaded (by Alire or by direct browsing). The only reason could be for a crate that includes all the information in the manifest, and it only has a store of the archive somewhere, but that is rarely the case.
I suggest extracting the repository URL from the origin field for those crates lacking a website field and stored in well-known forges. I'm open to write the script for completing the website field in the index and prepare a pull-request, but I don't know if changing other maintainers manifests is even allowed.
There are 238 manifests without a website. Sample steps to get the list from alire-index repository root: