GNU bug report logs -
#40693
28.0.50; json-encode-alist changes alist
Previous Next
Reported by: Ivan Andrus <darthandrus <at> gmail.com>
Date: Sat, 18 Apr 2020 03:01:02 UTC
Severity: normal
Tags: fixed, patch
Found in version 28.0.50
Fixed in version 28.1
Done: "Basil L. Contovounesios" <contovob <at> tcd.ie>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
"Basil L. Contovounesios" <contovob <at> tcd.ie> writes:
> João Távora <joaotavora <at> gmail.com> writes:
>> "Basil L. Contovounesios" <contovob <at> tcd.ie> writes:
> 0. bar.el does not use lexical-binding.
> 1. The second lambda in forty-two does not let-bind foo-42.
> 2. If you byte-compile bar.el with bar-have-native-42 set to t, and then
> load bar.elc in an Emacs that has bar-have-native-42 set to nil, then
> 42.0 gets printed, which is wrong. This is due to the incorrect
> usage of eval-when-compile: we want the check to happen at runtime as
> well.
I think you mean load-time. Anyway, this is true if you want 27.1 elc's
to be loadable in 26.x. I was labouring under the impression that we
don't care about that (and this is why I thought of the macro approach).
Do we? The source file is compatible between multiple emacs version,
but is the byte-compiled file also compatible?
>> No idea how to check if byte-code is "valid" or not: I just check the
>> warnings. Can you tell me?
>
> 0. emacs -Q -batch -f batch-byte-compile foo.el
> 1. emacs -Q
> 2. (fset 'json-parse-buffer nil) C-j
> 3. M-x load-file RET foo.elc RET
> 4. (disassemble 'foo) C-j
Thanks.
> I think the declarations make the intention explicit to both the reader
> and the byte-compiler in a simple way, without wrestling the
> eval-*-compile machinery or allowing for subtle bugs like the ones
> above.
The problem, of course, is that you're repeating yourself, a maintenance
hazard. Not too big in this case.
João
This bug report was last modified 5 years and 57 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.