joaotavora / sly-quicklisp

Quicklisp support for SLY
31 stars 11 forks source link

[FYI] [sly-*-autoloads] [emacs-27] load-path and autocompile #3

Open rprimus opened 5 years ago

rprimus commented 5 years ago

Fri May 17 11:57:25 BST 2019

Hi.

Just noticed that the only packages with a compiled *-autoloads.elc:

: ; ag -aig 'autoloads.elc'
sly-named-readtables-20150817.1516/sly-named-readtables-autoloads.elc
sly-quicklisp-20170112.935/sly-quicklisp-autoloads.elc
sly-macrostep-20160119.1234/sly-macrostep-autoloads.elc
➜  elpa git:(master) ✗

The above packages are the only ones to provide a package-autoloads.el.

Q: Are these still required or can emacs auto-generate the appropriate autoloads file?

Background info:

It may be worth looking at: https://github.com/slime/slime/pull/512 - info in this comment.

The above commit and https://github.com/slime/slime/commit/f34e8ec18c7435e14748ad7bb94f4e47d216f204

complete the preparations for Emacs-27 (with a package provided autoloads file).

rprimus commented 5 years ago

Wed Jun 26 09:21:48 BST 2019

Hi. For the above packages, package.el is not generating a <package>-autoloads.el. Their git versions are being installed and thus being compiled.

In each of the above packages, there is only one autoload cookie for file <package>/<package>.el. It is of the form:

;;; Automatically add ourselves to `sly-contribs' when this file is loaded
;;;###autoload
(add-to-list 'sly-contribs '<package> 'append)

Have been trying to read autoload.el to see why a local <package>-autoloads.el is not being generated when update-directory-autoloads is run.

rprimus commented 5 years ago

Wed Jun 26 16:30:42 BST 2019

Think I’ve figured it out.

repo provided sly-macrostep-autoloads.el

package-generate-autoloads sly-macrostep-autoloads.el

The generated one has all that is needed to support emacs-quickstart:

  1. The load-path directive
  2. The no-byte-compile directive

Solution:

  1. :exclude package-autoloads.el from the MELPA recipe
  2. remove package-autoloads.el from the repo

Note

The reason I saw no changes on my system: at some time in the past, I removed sly-autoloads.el and re-generated it.

@drot got me thinking when he mentioned your change had solved his issue

rprimus commented 5 years ago

Wed Jun 26 17:42:50 BST 2019

@luismbo has mentioned the use case of installing via git - hence requiring package-autoloads.el.

This would remvove Solution 2. My suggestion would then be to generate the autoloads file via package-generate-autoloads - to ensure both use cases are using the same autoloads file.

joaotavora commented 5 years ago

@rprimus thanks for all the investigation.

I don't change these repositories very often, and frankly I didn't generate the autoloads at all. Well, actually only once, they were all inherited from https://github.com/joaotavora/sly-hello-world

Frankly, I'm OK with both solutions, 1 (:exclude) or 3 (re-generate the autoloads for all these packages). One important place to do this would be sly-hello-world, so that new authors don't copy the mistake over to their new contribs.