[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#76573: 30.1; native compilation fails for record inside function
From: |
Eli Zaretskii |
Subject: |
bug#76573: 30.1; native compilation fails for record inside function |
Date: |
Sun, 13 Apr 2025 10:52:35 +0300 |
Ping! Lin Jian, can you please answer Andrea's questions, so we could
decide how to proceed with this issue?
> Cc: 76573@debbugs.gnu.org
> From: Andrea Corallo <acorallo@gnu.org>
> Date: Mon, 31 Mar 2025 11:06:13 -0400
>
> Lin Jian <me@linj.tech> writes:
>
> > Run the following shell command and you see the error.
> >
> >> emacs -Q --batch --eval="(native-compile (defun foo-f () (record 'foo-r)))"
> > Error: error (foo-f "Type foo-r missing from typeof-types!")
> > signal(error (foo-f "Type foo-r missing from typeof-types!"))
> > comp--native-compile(foo-f nil nil)
> > native-compile(foo-f)
> > eval((native-compile (defun foo-f nil (record 'foo-r))) t)
> > command-line-1(("--eval=(native-compile (defun foo-f () (record
> > 'foo-r)))"))
> > command-line()
> > normal-top-level()
> > peculiar error: "Type foo-r missing from typeof-types!"
> >
> > If you set `native-comp-speed' to -1, 0 or 1, there is no error.
> >> emacs -Q --batch --eval="(setopt native-comp-speed 1)"
> >> --eval="(native-compile (defun foo-f () (record 'foo-r)))"
> >
> > Emacs 30.0.93 and 30.1 have this bug, while Emacs 29.4 does not.
> >
> > Real world elisp packages triggering this bug are emacs-aio[1] and
> > el-easydraw[2].
> >
> > [1]: https://github.com/skeeto/emacs-aio/issues/31
> > [2]:
> > https://github.com/misohena/el-easydraw/blob/f6b0f43138693b73cb65327d28bd2a4ee1b6caa7/edraw-path.el
>
> Hi Lin,
>
> the compiler is complaining because while the code is trying to create
> an object of type 'foo-r', this was actually never defined.
>
> Typically those user defined objects are defined using higher level
> constructs like 'cl-defstruct' which takes care of registering the
> definition into the global state (and defining the creator
> 'make-foo-r').
>
> Why is this code trying to create never defined kind of objects? Isn't
> the case that the code in the file being compiled is missing some
> require to the definition?
>
> Andrea
>
>
>
>
- bug#76573: 30.1; native compilation fails for record inside function,
Eli Zaretskii <=
- bug#76573: 30.1; native compilation fails for record inside function, Lin Jian, 2025/04/23
- bug#76573: 30.1; native compilation fails for record inside function, Andrea Corallo, 2025/04/25
- bug#76573: 30.1; native compilation fails for record inside function, Lin Jian, 2025/04/25
- bug#76573: 30.1; native compilation fails for record inside function, Eli Zaretskii, 2025/04/26
- bug#76573: 30.1; native compilation fails for record inside function, Lin Jian, 2025/04/26
- bug#76573: 30.1; native compilation fails for record inside function, Eli Zaretskii, 2025/04/26
- bug#76573: 30.1; native compilation fails for record inside function, Lin Jian, 2025/04/26
- bug#76573: 30.1; native compilation fails for record inside function, Eli Zaretskii, 2025/04/26
- bug#76573: 30.1; native compilation fails for record inside function, Andrea Corallo, 2025/04/29
- bug#76573: 30.1; native compilation fails for record inside function, Andrea Corallo, 2025/04/29