GNU bug report logs -
#44676
[PATCH] Support native compilation of packages on install
Previous Next
Reported by: Stefan Kangas <stefan <at> marxist.se>
Date: Mon, 16 Nov 2020 02:39:01 UTC
Severity: wishlist
Tags: fixed, patch
Done: Stefan Kangas <stefan <at> marxist.se>
Bug is archived. No further changes may be made.
Full log
Message #17 received at 44676 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Andrea Corallo <akrl <at> sdf.org> writes:
>> BTW, what is the purpose of the LOAD parameter here?
>
> The main purpose of that parameter is to serve deferred compilation.
Thanks for the explanation, that clarifies things.
This gets me thinking, could we change the LOAD parameter to be called
LATE instead with valid values nil or non-nil? Or is there a specific
reason why one would want to use LOAD set to t instead of just, say:
(native-compile-async "foo.el")
(load "foo.el")
Maybe the above example is a bit contrived, but I'm mostly trying to
understand if we have an opportunity to simplify the interface.
Oh, and come to think of it, could we just rename "late" load to
something more descriptive (for example "after-bytecode") or would that
be tremendously ugly? :-)
> I think is simpler, we should from package just issue the compilation
> without any kind of 'load'. Then around comp.el:3528 instead of
> complaining in case of a compilation with late load issued on a file
> with no load property just fixup the missing the late load in
> `comp-files-queue'.
>
> This will cover the case where package ask for the compilation but
> before is completed the user load the elc and deferred compilation issue
> another compilation with late load.
OK, thanks. Please see my patches below.
> When we want to replace bytecode function definitions we perform this
> special kind of load that I called 'late'. During this load instead of
> executing all top level forms of the original files we execute only
> function definitions (paying attention to have these effective only if
> the bytecode definition was not changed in the meanwhile).
>
> We should probably make this paramenter private (as for the syncronous
> variant `native-compile') as should be really for internal use only,
> WDYT?
Yes, that sounds very reasonable. See the fourth patch below.
[0001-compile-async-Don-t-error-out-if-late-loading-after-.patch (text/x-diff, attachment)]
[0002-Support-native-compilation-of-packages-on-install.patch (text/x-diff, attachment)]
[0003-lisp-emacs-lisp-comp.el-native-compile-async-Doc-fix.patch (text/x-diff, attachment)]
[0004-Make-load-argument-of-native-compile-async-internal.patch (text/x-diff, attachment)]
This bug report was last modified 4 years and 264 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.