melpa / package-build

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

[Info]: What are the reasons behind a customizable version-regexp #89

Closed meedstrom closed 2 weeks ago

meedstrom commented 2 weeks ago

I'm wary of starting a discussion about design choices where smart people have probably spent a lot of time thinking about them, so I just want to ask someone for a quick answer, or it would be great if someone can point me to past discussions, which I could not find on this issue tracker nor on that of Melpa.

Background:

If I were to try to answer this myself, I'd guess that it is historical reasons from when Melpa Stable was just being rolled out and wanted to add as many packages as possible. I guess another reason might be to filter out tags that the author does not intend to be version strings, but I don't think of this as an unfixable issue from the author's perspective.

milkypostman commented 2 weeks ago

I'd guess that it is historical reasons from when Melpa Stable was just being rolled out and wanted to add as many packages as possible

Yup

purcell commented 2 weeks ago

Needing a regexp at all is already one level of complication, making it user-customizable and unique per package adds another level

There's a default which almost always works.

I'd guess that it is historical reasons from when Melpa Stable was just being rolled out and wanted to add as many packages as possible.

And also that some elisp packages are hosted in bigger non-elisp repositories that have all sorts of tag naming conventions dating back many years.

meedstrom commented 2 weeks ago

Thanks for your responses!

The reason I wanted to know, is that there are at least two new package managers that will do version checking that is aware of tags. One is Elpaca, and another may be the Emacs 30 or 31 use-package :vc, going by current discussions on emacs-devel.

Problems I foresee:

You could consider it out of scope for Melpa to worry about this, but might it make sense when the dust settles to gently ping authors who use tags that would not match whatever version-regexp Emacs 30/31 settles on? (I can do it for you.)

If you agree, then a separate thing that can already be done is to say that new recipes submitted to Melpa may not specify a custom regexp henceforth. Just an idea, but from your responses, it seems we are not going to discover new big non-elisp repositories that have all sorts of tag naming conventions dating back many years ;)

purcell commented 2 weeks ago

These seem to be very speculative concerns that other people planning future work might make different choices from us, plus ideas about how we could mitigate that. Ultimately MELPA exists to build and host installable packages, and it's a secondary concern whether the recipes and build machinery are useful to anyone else.

We're generally just doing what works for us across almost 6000 packages since 2012. If someone wants to reinvent what MELPA does without reusing it, they will eventually hit the same issues we did and either learn from what we did or invent something incompatible. I've seen more of the latter than the former, particularly from the core/ELPA folks, so I don't see a productive role for us in this discussion.


Couple of concrete points nonetheless:

%v is apparently just a shorthand for a longer regexp pattern, which makes sense to me, so that would easily by handled by whatever hypothetical package managers you're worried about.

I probably wouldn't have added %p to package-build myself, but no MELPA recipes actually use it, so this is all a bit moot. @tarsius might have a good reason for %p though. If not, we can just remove it.


I'll go ahead and close the ticket because I think we've answered the headline question, but feel free to comment further.

meedstrom commented 2 weeks ago

Thank you for your time.

purcell commented 2 weeks ago

^ Apologies if a little saltiness is showing. I'm happy that some other package installers have found it helpful to use our recipes etc., but all the Non-GNU ELPA and package-vc machinery has tended to reinvent those and MELPA in new and incompatible ways, and I've personally found that a little frustrating. :)