GNU bug report logs -
#43190
feature/native-comp; failure to compile json-mode leaves Emacs broken
Previous Next
Reported by: Tom Gillespie <tgbugs <at> gmail.com>
Date: Fri, 4 Sep 2020 01:07:02 UTC
Severity: normal
Done: Andrea Corallo <akrl <at> sdf.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
Hi Andrea,
Having poked about a bit more I agree. I don't think it has
anything to do with the native compilation directly. I suspect that it
has to do with how or exactly when the native compiled code is swapped
in. When byte compiling on the command line I get an error at the same
place that I get one when native compiling stating that json-snatcher
could not be required. However when byte compiling the file, the code
to add to kill-buffer-hook is not run. I'm wondering whether the load
starts, native comp kicks in, succeeds on the first couple of forms,
then fails for the same reason as bytecomp, except that the first
forms were successfully loaded? This assumes that native-comp compiles
and loads single expressions at a time. The other possibility that
comes to mind is that maybe the regular el file forms are loaded, and
then there is a step where the forms that would be replaced are
unloaded? My ignorance of how you do the swap doesn't help here. Note
that if you try to repro this now you will have to install an older
version of json-snacher since the patch to fix the issue has been
merged. Best,
Tom
On Fri, Sep 4, 2020 at 12:56 AM Andrea Corallo <akrl <at> sdf.org> wrote:
>
> Hi Tom,
>
> thanks for the detailed report.
>
> Tom Gillespie <tgbugs <at> gmail.com> writes:
>
> > While this is clearly a bug in the way that json-snatcher is written
> > (the symbol should never have been added to the hook before the
> > function was defined), it is only causing an issue with the new native
> > comp code.
>
> had no time to reproduce but to a very first look I'm quite unconvinced
> this is a native-comp bug. I think you'd get the same exact error
> byte-compiling the file from shell using a vanilla Emacs.
>
> The fact is that native async compilations are child processes so they
> start with a clean environment. This makes the native compiler a little
> more picky on bugs when the compilation is relaying silently on some
> definition sneaked in from the environment.
>
> This lead already to a number of packages to fix their requires.
>
> The proof is typically trying to byte-compile from shell, this give
> systematically the same error, this because the front-end of the native
> compiler *is* the byte-compiler :)
>
> Each compilation unit should be consistent and compilable autonomously
> without relaying on previous modifications of the environment.
>
> Thanks
>
> Andrea
This bug report was last modified 4 years and 249 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.