cli
cli copied to clipboard
Missing autoloads on packages with no autoloads
I link some packages which have no autoloads, such as trinary, which is only a library package. But eask complains every time that the autoloads are not found
Error loading autoloads: (file-missing Cannot open load file No such file or directory /home/matus/.emacs.d/projects/Elsa/.eask/28.2/elpa/trinary-1.2.1/trinary-autoloads)
Error loading autoloads: (file-missing Cannot open load file No such file or directory /home/matus/.emacs.d/projects/Elsa/.eask/28.2/elpa/elsa-0.1.0/elsa-autoloads)
Error loading autoloads: (file-missing Cannot open load file No such file or directory /home/matus/.emacs.d/projects/Elsa/.eask/28.2/elpa/ansi-0.4.1/ansi-autoloads)
I don't know what is the best option here for now.
This is Emacs' behavior; you can get rid of it by generating the autoload file yourself or do eask autoloads.
We can mute this message, of course, but then we are not respecting what package.el produces. This is similar to https://github.com/emacs-eask/cli/issues/131#issuecomment-1454946413. We can generate the autoload files with Eask too. 🤔
So this error comes from package.el directly and you only re-print it? Would it be possible to add some hint about what to do to make it go away? Similar to the messages in the beginning when for example Eask file and the project file's metadata are not in sync.
It's there,
https://github.com/emacs-eask/cli/blob/7322c2d09e56b072b0f29c909ae3541ec7944ea2/lisp/help/link/add/success/pkg#L4
I guess the help menu is not very obvious. 😅
This message is only printed when after the link command though, but then every time I execute anything through eask it complains about the missing autoloads. It should also suggest some action then, that's what I ment. Or would it be too much spam?
Hmmm... maybe suggest the solution after the error message appears?
I chose to do nothing due to the fact it doesn't break package.el. But it will still be nice to let users know what going on, so I chose not to mute the message and let users decide what to do. I think the help menu is enough since it already tells you the solution. :P WDYT? 🤔
To me, when something starts with "Error" it sounds serious. I myself had no idea that package.el even does this and I've been writing elisp half my life.
The help menu after eask link add is great, but I still feel like there should be some message after these error lines.
Similar to this, it's a suggestion which is easy to follow and actionable:

To me, when something starts with "Error" it sounds serious. I myself had no idea that package.el even does this and I've been writing elisp half my life.
I don't think Error loading autoload due to the file missing is a critical issue since many packages do not even use ;;;###autoload in their packages. I guess that is why package.el doesn't just stop working... ? 🤔
The help menu after eask link add is great, but I still feel like there should be some message after these error lines.
Similar to this, it's a suggestion which is easy to follow and actionable:
This would be a different mechanism, Eask-file suggestions happen during the file loading, so it's easy to integrate. If we want to suggest solution for other module, e.g. package.el, etc. We would somehow need to bind a function (to output solution) to where the error is reported. And yeah, it could spam a little. In terms of UX, I would need to think about this.
Another alternative is to document this to our FAQ. 🤔