Closed rktjmp closed 2 years ago
This may not be an issue in the real world, since you can run the 5.4.0 built executable in a 5.1.5 runtime, but it might catch someone out.
I can't reproduce this problem; can you give some details about the system on which you're seeing this?
Sorry yes,
Arch Linux, Linux 5.13.10-arch1-1 #1 SMP PREEMPT Thu, 12 Aug 2021 21:59:14 +0000 x86_64 GNU/Linux
There was some talk of glibc versions, I have 2.33
.
Both versions of Lua built clean before the test.
Could you share your locale settings? We had a similar problem a while back that couldn't be reproduced without changing locale.
λ locale
LANG=en_US.UTF-8
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES=
LC_PAPER="en_US.UTF-8"
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT="en_US.UTF-8"
LC_IDENTIFICATION="en_US.UTF-8"
LC_ALL=
If you build Fennel with Lua 5.1.5, strings in the Lua output are incorrectly encoded. It effects
fennel
andfennel.lua
.Edit: updated to show failure to encode escaped
"
characters, which is what made me notice. Without that the code will still run, just looks unreadable.Using https://github.com/asdf-vm/asdf makes it easy to swap Lua versions.
test.fnl
Build with Lua 5.4.0
Output
Build with Lua 5.1.5
Output
diff of executables