praeclarum / FuGetGallery

An alternative web UI for browsing nuget packages
https://www.fuget.org
MIT License
683 stars 121 forks source link

RFC: Package Vision / Package Lenses #109

Open jzabroski opened 4 years ago

jzabroski commented 4 years ago

This is a Architecture Design RFC. Maybe this feature exists and I don't know how to use fuget.org properly, or missed some things when looking through the code.

I propose Package Vision, a marketing brand for a collection of services generalizing ApiDiff class, whereby we can write analysis tools on the PackageData class. Each package analyzer will be called a Package Lens in the UI, as it would provide a unique view at the package assets.

Potentially, Package Lenses could be uploaded to fuget.org as "sidecar" packages and tagged with which nuget.org packages they're intended to analyze. For example, if you've upgraded from one version of a library to another, and want to share your upgrades, you could use the output of the ApiDiff tool to describe how to resolve breaking changes you've found. In this sense, lenses are a collaborative tool with full access to the packages symbolic dependencies.

The key idea is that while the API Diff tool is great, I often want to answer specific questions, such as:

image

praeclarum commented 3 years ago

These are all great ideas, thank you. I have really wanted to integrate the diff results with more of the UI and these are interesting ways to do that.

I'm a little unclear about the sidecar feature, but will re-read and think about it.

jzabroski commented 3 years ago

The basic idea is that nuget.com already supports uploading analyzers as packages. Pretty much the only special types nuget.com supports today are Tools (.NET CLI Tools) and Symbol Packages (snupkg format for debugging and source linking).

As an initial prototype, all you need to do is check if the package has a tag "packagelens=PackageName" and you'll know its meant to be a lens for a particular package. If it gains traction and popularity, it can then become a formal nuget.com standard. No other community in other languages has something like this. Smalltalk is probably the closest.