melpa / package-build

Tools for assembling a package archive
https://github.com/melpa/melpa
25 stars 34 forks source link

Massive refactor #15

Closed tarsius closed 6 years ago

tarsius commented 6 years ago

Subsequently I am criticizing the existing code quiet harshly. I am pretty sure that @purcell and @milkypostman will understand that correctly, but others might read this as well, so I would like to emphasize that this is not intended as a criticism of the authors or their skills. I maintain a project similar to Melpa and as part of that maintain tools similar to this one, and know how much work it is to just keep things going. It is very tempting and often the only course of action that won't make you burn out or otherwise go insane to just keep adding features and fixing bugs without taking a step back and refactor.

Motivation

  1. A long time ago I have said that I would like to replace the timestamps that are used on Melpa (non-stable) with version strings of the form VERSION.UPDATE-COUNT. Or something like that. I think that the plan outlined in https://github.com/melpa/melpa/issues/2955 is fairly sound, but I haven't looked at it in a while.

    Many others have expressed interest in something like this but nobody has implemented anything. Anyway the point is that I think it should be fairly simple to do that. But when I went looking for how to inject that feature into the existing code I ran into a lot of accidental complexity.

  2. I am the maintain the Emacsmirror, which in many ways is similar to Melpa. The primary output of Melpa is a collection of package.el-compatible packages, while the primary output of the Emacsmirror is a database containing a list of Git repositories containing Emacs packages, as well as lots of metadata about these packages.

    For most users the output of Melpa is more useful, but I am happy that there now are a few users who use my Borg package manager and my Epkg manager.

    But my work on the Emacsmirror benefits Melpa users as well. In the early days of the Emacsmirror I went looking for packages to add myself. Nowadays I rely on Melpa for that purpose. Some time after a package is added to Melpa, I also semi-automatically add it to the Emacsmirror.

    Because the Emacsmirror extracts more metadata about packages than Melpa does, that often leads to the discovery of issues that @purcell did not catch during his (very valuable) review. I then contact the maintainer and ask them to fix the issues, or even do it for them. These fixes make it into Melpa as well on the next update.

    Additionally, even though I don't use package.el myself, I am a top contributor to Melpa (right after the two head honchos). By comparing the data found in Melpa and the Emacsmirror I not only find issues in individual packages but also to issues in Melpa recipes and that leads to a lot of commits.

    Anyway the Emacsmirror extracts a lot more metadata about packages than Melpa (or that package.el currently supports (give epkg a try)) and some of that could be ported to Melpa (and package.el). But again the accidental complexity gets in the way.

    The Emacsmirror too could benefit from Melpa more if package-build.el were more similar to the respective tools used to maintain the Emacsmirror.

  3. The reason I am doing this now is that after the next release Magit's development will move to two long-lived branches (likely maint and master). I would like Melpa Stable to continue to contain releases such as 2.12.1, Melpa to stay on maint on offer versions like 2.12.1.5, and my own Elpa archive to offer versions like 2.99.101 from master. For that I need VERSION.UPDATE-COUNT support, as well as some other things that I don't want to implement on top of the current package-build.el implementation.

Melpa could be improved in many ways, and many users request such changes, but when they are told by the overworked maintainers to lend a hand not much happens. I think this is partially due to the accidental complexity that makes it hard to add something new. The primary goal of these commits is to remove some of that complexity so that package-build.el and by extension Melpa can grow new features.

Status

Changes

This patch series does not fix all of the mentioned issues. It fixes some instances of each of the mentioned issue categories, while leaving others untouched.

tarsius commented 6 years ago

I'm consequently not sure how best to fully assess & communicate the likely downstream effects not just on MELPA but on Cask, Quelpa etc., and any other code that uses this.

We could just use it for Melpa for a while.

purcell commented 6 years ago

We could just use it for Melpa for a while.

Sounds like a plan!