ciao-lang / ciao

Ciao is a modern Prolog implementation that builds up from a logic-based simple kernel designed to be portable, extensible, and modular.
https://ciao-lang.org
GNU Lesser General Public License v3.0
272 stars 21 forks source link

Symbol’s function definition is void: batch-update-autoloads #86

Closed thierrymarianne closed 7 months ago

thierrymarianne commented 1 year ago

Hello 👋🏼,

Trying to build ciao_emacs.emacs_mode with

led me to seeing the following error message:

Error: void-function (batch-update-autoloads)                                                                    

  mapbacktrace(#f(compiled-function (evald func args flags) #<bytecode -0xd142751b2512f81>))                     
  debug-early-backtrace()                                                                                        
  debug-early(error (void-function batch-update-autoloads))                                                      
  batch-update-autoloads()                                                                                       
  command-line-1(("--eval" "(setq generated-autoload-file \"~/.ciaoroot/v1.22.0-m7/ciao_emacs/elisp/ciao-site-file.el\")" "-f" "batch-update-autoloads" "."))                                                           
  command-line()                                                                                                 
  normal-top-level()                                                                                             

Symbol’s function definition is void: batch-update-autoloads   

most likely because of changes affecting emacs 29.1, especially:

** The autoload.el library is now obsolete.
It is superseded by the new loaddefs-gen.el library.

as suggested by @mherme

A patch has been committed to ensure the command ciao-boot.sh build ciao_emacs terminates with a non-zero exit code: https://github.com/thierrymarianne/contrib-ciao/commit/1841e1da1b1e48c55001a4f07c4e5c5ec8f9ba63

(after trying a more naive approach, which would not have ensured backward compatibility with emacs < 29.0)

I will gladly open a pull-request if this change would be satisfying enough.

thierrymarianne commented 1 year ago

We could also detect emacs version before switching from using batch-update-autoloads to using loaddefs-generate-batch.

It wouldn't cover the requirement i had to call (require 'autoload) as well at first, though.

thierrymarianne commented 7 months ago

Thanks!