Subject: bug#46256: [feature/native-comp] AOT eln files ignored if run from build tree

From: Eli Zaretskii <[email-masked]>
Date: Tue, 09 Mar 2021 18:42:16 +0200

> From: Andrea Corallo <[email-masked]>
> Cc: [email-masked], [email-masked], [email-masked]
> Date: Tue, 09 Mar 2021 14:55:40 +0000
> 
> Eli Zaretskii <[email-masked]> writes:
> 
> >> I guess `load' was called two times on the same filename.
> >
> > Is this likely to happen?  Our code generally uses 'require', which
> > should avoid that.
> 
> cc-*.el files for instance have more than one direct call to load.  IIRC
> one of the analyzed cases was cc-mode related (certanly one I observed).

Yes, that's the cc-require macro, as I have discovered meanwhile.  I'm
not yet sure I understand why CC mode does that.

> >> > What are the reasons for unloading a .eln file which was once loaded
> >> > into a session?
> >>
> >> All the functions defined in it are not anymore reachable (read all
> >> symbols functions are makunbound or defined to some other function).
> >
> > That means someone did unload-feature, right?
> 
> Also loading for example a new version freshly compiled of the same file
> should present the same scenario.

Yes, that, too.  There's actually a problem with what we do in that
case, see my other (as yet unwritten) message.