haskell/haskell-mode

Distributing haskell-mode on NonGNU ELPA

phikal opened this issue · 34 comments

As mentioned in a commit comment, I am preparing a few packages for inclusion in NonGNU ELPA. Among these is haskell-mode.

The ELPA build-system assumes a new package is released, whenever the version tag is bumped, but haskell-mode does not include a header, as it is distributed by MELPA, that adds a version tag before packaging.

Currently, the plan is to manually tag the last release, but to avoid having to manually update the version tag for each release, it would be helpful if a version tag could be added to haskell-mode.el itself, when the next release is being prepared.

Just as an update, the package has been added to NonGNU, with a manually tagged commit for now: https://elpa.nongnu.org/nongnu/haskell-mode.html

While I'm not averse to distributing this on NonGNU ELPA in due course, I'm honestly not super happy that it has happened without any any feedback or buy-in from the Haskell Mode maintainers.

I understand your complaint, and if you wish it can be removed for the time being, or at least until others weigh in.

I'd probably prefer that, please, because I want to understand and manage the whole process so that we'll know that future releases will get tagged and distributed properly.

Thanks, appreciated. Let's leave this issue open to record the wish.

No problem! I hope that it will be possible to install haskell-mode OOTB some day, so if there are any issues I'd be glad to help.

Has there been any progress on this issue?

Friendly ping to know the status of this. :)

To my knowledge, all that has to be done is to add a Version header.

Pi..ing?

FWIW, I just re-added haskell-mode to the elpa-packages file in NonGNU ELPA:
While it was removed from that file, it was never actually removed from NonGNU ELPA itself (because of a missing feature in elpa-admin.el which made it unable to remove a package from the archive-contents), so this doesn't make much difference in practice.
But the problem in elpa-admin.el file is about to be fixed, and in the mean time the hcel package was added to GNU ELPA, and it uses haskell-mode to highlight its code, so we'd rather not remove haskell-mode from NonGNU ELPA any more.

FWIW, I just re-added haskell-mode to the elpa-packages file in NonGNU ELPA: While it was removed from that file, it was never actually removed from NonGNU ELPA itself (because of a missing feature in elpa-admin.el which made it unable to remove a package from the archive-contents), so this doesn't make much difference in practice. But the problem in elpa-admin.el file is about to be fixed, and in the mean time the hcel package was added to GNU ELPA, and it uses haskell-mode to highlight its code, so we'd rather not remove haskell-mode from NonGNU ELPA any more.

Is the version on NonGNU ELPA up to date with the latest changes of the MELPA one?

If you mean regular, rolling-release MELPA, then no. It is pinned to the latest release, which is apparently 17.2. Until the issue mentioned in this thread is fixed, this will also mean that the package won't be auto-updatable.

I see, thanks for the explanation. The issue seems easily solvable, so fingers crossed. :)

This issue should be resolvable just like nex3/haml-mode#40.

@purcell Sorry to periodically bother you with this, but any chance it can be moved forward?

Version headers have just been bumped, and when I make future releases I'll bump them again. In the interim, my understanding is that I can just leave the "stable" version number in place unchanged and further commits in master won't cause re-builds in NonGNU ELPA, right? What are authors typically doing in this case in practice — bumping to a subsequent 14.4-git pre-release, or leaving the last stable version?

phikal commented

@purcell Fantastic Steve, thanks a lot for this.

Thanks folks.

Btw, I've done the same in a handful of my own popular repos:

  • exec-path-from-shell (requested here)
  • envrc (and inheritenv)
  • page-break-lines
  • reformatter (requested here and also discussed with @monnier)
  • package-lint

I won't personally have time to pursue getting any of those into NonGNU ELPA in the near future but if anyone else would like to, they can feel free.

(Or just ELPA if appropriate.)

phikal commented

I think adding exec-path-from-shell and package-lint has been requested, so I'll take a look at those first.

(Or just ELPA if appropriate.)

Do you know if all the significant contributors have signed the FSF CA?

phikal commented

Uh, I might have been to quick to change things on NonGNU ELPA's end, the package still doesn't appear to have any version header. That would require a change like this

diff --git a/haskell-mode.el b/haskell-mode.el
index 0930680fb8..05707bcdc9 100644
--- a/haskell-mode.el
+++ b/haskell-mode.el
@@ -11,6 +11,7 @@
 ;;          2001-2002 Reuben Thomas (>=v1.4)
 ;;          2003      Dave Love <fx@gnu.org>
 ;;          2016      Arthur Fayzrakhmanov
+;; Version: 17.3
 ;; Keywords: faces files Haskell
 ;; URL: https://github.com/haskell/haskell-mode

Also, I just noticed that the Authors header has a very unconventional form that appears to displease describe-package. Would you be open to a patch that would standardize the header, resolving this issue for older versions of Emacs?

I think adding exec-path-from-shell and package-lint has been requested, so I'll take a look at those first.
...
Do you know if all the significant contributors have signed the FSF CA?

For haskell-mode I doubt it. For package-lint and exec-path-from-shell, it's likely but I can't easily confirm it. Fine for things to go into NonGNU ELPA, but I think that for reformatter specifically there was a desire to have it in ELPA because a number of other packages depend on it, and I think I'm the only significant contributor there.

Uh, I might have been to quick to change things on NonGNU ELPA's end, the package still doesn't appear to have any version header.

The version number is in the -pkg.el file, which is the standard place to put such metadata for multi-file packages, so it'd be a pity if it had to be copied into a particular .el file as well. But obviously possible if there's no alternative. In MELPA over the last 10 years we've let authors put their metadata either in such a file or the headers of the <package-name>.el file, preferring the former if present.

Also, I just noticed that the Authors header has a very unconventional form that appears to displease describe-package. Would you be open to a patch that would standardize the header, resolving this issue for older versions of Emacs?

Yes, certainly.

phikal commented

MELPA also generates the -pkg.el file for multi-file packages, but only if it isn't there already. When present, it's used as-is, and considered to be the authoritative source of metadata. The logic for this is that technically you could have a package called foo-things containing foo-blah.el, foo-bloop.el and foo-things-pkg.el, with no foo-things.el at all. Not recommended, certainly, but possible. There are probably a couple of MELPA packages with that shape, though it would be rare.

phikal commented

just don't put any <pkg>-pkg.el in your repository

Mostly agree, I wouldn't have put this here myself, and I'll remove it in favour of putting metadata in haskell-mode.el. I'll fix up the Author header at the same time.

Done, and released as 17.4.