-
Couldn't load subscription status.
- Fork 32
Description
Context
A problem that has always existed forever, but is of course becoming bigger as time passes, is abandoned gems. You may depend on a gem, and one day when trying to upgrade Ruby or another gem realize it now has a very simple compatibility issue, but the original maintainer is no longer active, hence the gem will probably never receive an update.
If the gem is a “leaf”, meaning no other gems depend on it, it’s easy to just fork it and publish it under another name. However if other gems declare a dependency on it, the solutions are much more limited. You can reference a git fork and include the gem that way, which works but tends to be a lone solution rather than a community one. It’s rare, and rather not recommended to point your Gemfile at someone else’ fork of a repository.
Another possibility is to try to reclaim that gem name to become the new maintainer, but it’s slow and rarely works.
Proposal
I believe this community problem could largely be eased if it was possible to declare that a gem is standing up for another one in your Gemfile.
gem "console-formatter" # has a dependency on "left-pad"
gem "left-padder", as: "left-pad"In the above example we assume that left-pad, a very useful and popular gem that is pulled as a dependency by dozens of bigger gems, is no longer working with a future version of Ruby, and the maintainer is no longer active.
I, as another open source contributor, can fork that gem, give it another name (left-padder) and then instruct users that they can replace left-pad with it, by specifying it in their Gemfile.
If the situation persists and the left-pad maintainer remains inactive, the various gems that depend on left-pad can progressively decide to update their dependency declaration, but in the meantime users have a way out of the problem, and are unblocked.
Additional Use Cases
Such a feature would also allow for secondary use cases.
For instance, maintaining alternative versions of active gems that include features or changes the maintainer doesn’t wish to include upstream.
Another use case is for community maintained versions of EOL releases. If left-pad is currently at version 2, and the version 1 is EOL but a large community of users are still on version 1, they can maintain a left-pad-lts gem if they want.