Subject: Re: bug#70357: 30.0.50; loadup.el, load nadvice before seq

From: Stefan Monnier <[email-masked]>
Date: Fri, 12 Apr 2024 16:43:56 -0400

> I would like to propose loading nadvice before seq in loadup.el, for the
> following reason:

I'm not opposed to reordering, but ... have you tried?  AFAICT, `nadvice`
requires `oclosure` which requires `cl-lib` which uses `seq`, so it
might be tricky.

> If a seq.elc exists, and we dump bootstrap-emacs.pdmp, and seq.el gets
> loaded, then the cl-generic machinery will want to warn about the fact
> that certain method stuff in seq.elc is already compiled. This warning
> wants to use somethign from nadvice, and ultimately a recursive load
> (warnings.el requires icons.el, which uses seq, which leads to a
> warning, etc).

As a general rule, it's better (long term) to try and fix those circular
dependencies by breaking the cycle.

Maybe we could tweak `cl-generic` so it calls the byte-compiler in a way
that silences all the warnings?
Also, I'm not sure loading `icons` is necessary batch mode, so maybe we
could make that conditional.

        Stefan