emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Enabling native compilation by default when libgccjit is present


From: Michael Heerdegen
Subject: Re: Enabling native compilation by default when libgccjit is present
Date: Thu, 09 Dec 2021 01:44:30 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)

Eli Zaretskii <eliz@gnu.org> writes:

> The JIT compilation doesn't just happen randomly because Emacs decides
> it's an opportune moment for it.  It happens because the session loads
> some Lisp file.  A live Emacs session used for real-life work will
> always load Lisp files, as needed.  Loading a Lisp file (via 'load' or
> 'require' or any similar API) could potentially pop up warnings and
> errors without any relation to native compilation, because something
> went wrong while loading.  I presume you won't argue for shutting up
> such messages caused by some problems in the load process or in the
> interaction of the loaded code with what you already have in the
> session, would you?  Then how are the warnings triggered by JIT
> compilation different, in principle?  They are the same phenomenon:
> Emacs loaded some Lisp package because some command needed it, and
> loading it caused warnings due to issues with the loaded code.

Lars found already better words for this.  The main problem is that it
happens while loading.  Some day when native compilation is normal like
byte compilation, the problem might not be as bad.  But currently most
packages available have not been optimized for native compilation.  A
lot will never be fixed because they are abandoned.  So a lot of
warnings will always be there, but the packages still do work, and the
user can do nothing about the warnings.  And: package maintainers often
don't care about warnings at all, we see that today with byte
compilation.  Summary: those warnings are good for developers but not
helpful otherwise.  And they annoy most people when they appear while
loading a package.

Idea: could we have a setting saying "show warnings from native
compilation only when installing something or byte compiling, but not
when recompiling (natively) because the Emacs binary has changed"?  That
would still show all warnings once, but would not get in the way when
trying to work.  That could be default.  Developers could still say
"show those warnings always".

Michael.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]