Help users discover forked packages
The null safety migration has highlighted that, as in any ecosystem, there are many packages that are no longer maintained. I don't generally think that's a problem because forking exists as a mechanism to let the ecosystem to route around inactive packages.
However, forks can be difficult to discover. I dimly recall that GitHub started showing forks in its UI many years ago in large part for this reason. Have we considered trying to surface this in pub.dev for packages that have been forked? That may help users pivot to more recent forks of packages that have gone dormant.
cc @eseidelGoogle
I think this would be very useful too!
Discoverability on pub of alternative versions of a package is definitely not great at the moment.
One thing I would suggest is to not tie this to GitHub forks of the original package, as I've found that GitHub actually makes things annoying when maintaining an active "fork" repo as it does things like automatically make new PRs point at the original repo rather than the forked one. And of course while GitHub is overwhelmingly popular now, some people may want to host package forks elsewhere.
Another reason to not tie this to GitHub: search is disabled on forked repositories, and once the codebase diverges a bit, it just makes no sense to keep the forked status, it is easier to just detach from the original repository.
Do we need to validate that something is actually a fork of something else? If not, don't we risk folks just create new packages, and claim it's a fork of some other highly popular package?
Do we need to validate that something is actually a fork of something else?
I think that when a fork happens, the original code changes (otherwise there is no reason to fork), and the new owner may need to gain trust from scratch. Even if we verify that the code is similar, we cannot vouch for the new owner.
If the original author has a strong opinion on it, they may indicate it in a newly published readme or in the replacedBy field, or, as happened in one of my packages, they can transfer ownership by adding a new uploader. I think these are strong signals, but they can't be gathered in an automated way.
@jonasfj suggests adding a field in the pubspec like:
fork: <package>
And then make a search expression fork:foo, and on the package page have a link in the side-bar leading to that search.